目錄
一、前言
上一篇文章我整理以前的筆記是:列表-實際應用-嵌套列表-分級菜單,詳細可參考博文 web快速入門之基礎篇-html:7、列表-實際應用-嵌套列表 這篇文章我將整理筆記:表格-定義和用法、基本結構
二、實例演示
實例代碼
我們先來看看一個例子,如下代碼:01_table、tr、td.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>這是title標題</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
</head>
<body>
<table>
<tr>
<td>aaa</td>
<td>bbb</td>
</tr>
<tr>
<td>ccc</td>
<td>ddd</td>
</tr>
</table>
</body>
</html>
效果演示
用谷歌瀏覽器打開運行,效果如下:
三、知識點說明
1、表格的定義和用法
table 標籤
標籤定義 HTML 表格
tr 標籤
元素定義表格行
td 標籤
元素定義表格單元(列)
2、表格的基本結構
<table>
<tr>
<td>aaa</td>
<td>bbb</td>
</tr>
<tr>
<td>ccc</td>
<td>ddd</td>
</tr>
</table>