1.<tr> </tr>是個雙標簽,<tr>是開始標簽,</tr>是結束標簽定義 HTML 表格中的行(Defines a table row)。
2.<td></td>也是雙標簽,<td>是開始標簽,</td>是結束標簽。用來定義 HTML 表格中的標準單元格。
3.壹個 <tr> 元素包含壹個或多個?<th>?或?<td>?元素。
擴展資料:
Table控件主要用於在web頁面上創建表格,其功能與HtmlTable類似。不同的是,Table控件可以用動態的內容以編程的方式來生成表格。
基本語法
〈table〉...〈/table〉 - 定義表格
〈th〉 - 定義表頭 Defines a table header
〈tr〉 - 定義表行 Defines a table row
〈td〉 - 定義表元(表格的具體數據) td stands for "table data," Defines a table cell.
表元
(Table Span)
多列表元
〈th colspan=#〉
<table border>
<tr><th colspan=3> Morning Menu</th>
</table>
多行表元
〈th rowspan=#〉
<table border>
<tr><th rowspan=3> Morning Menu</th>
<th>Food</th> <td>A</td></tr>
<tr><th>Drink</th> <td>B</td></tr>
<tr><th>Sweet</th> <td>C</td></tr>
</table>
表格設置
〈table border=#〉
邊框尺寸
<table border=10>
</table>
〈table border width=# height=#〉
表格尺寸
<table border width=170 height=100>
</table>
〈table border cellspacing=#〉
表格間隙
<table border cellspacing=10>
</table>
〈table border cellpadding=#〉
空白設置
<table border cellpadding=10>
<tr><th>Food</th> <th>Drink</th> <th>Sweet</th>
<tr><td>A</td> <td>B</td> <td>C</td>
</table>
參考資料: