html表格的基本組成:: 表格標(biāo)題或摘要: 表格標(biāo)題行: 表格數(shù)據(jù)行主體: 表格腳注行: 一行表格數(shù)據(jù): 表頭單元格: 數(shù)據(jù)單元格
HTML 中表格的基本組成
表格 (table) 元素是 HTML 中用于創(chuàng)建表格數(shù)據(jù)的元素。它由幾個(gè)基本組成部分組成:
定義表格的標(biāo)題或摘要。
位于
| ) 數(shù)據(jù)。
| |||
|---|---|---|---|
| ) 數(shù)據(jù)。
| |||
| (表頭)或 | (數(shù)據(jù))元素。
| 元素: 定義表頭數(shù)據(jù)單元格。 通常居中對齊并加粗顯示。
| 元素: 定義數(shù)據(jù)單元格。 可以包含文本、數(shù)字、圖像或其他 HTML 元素。 示例: <code class="html"><table>
<caption>員工信息</caption>
<thead><tr>
<th>姓名</th>
<th>職務(wù)</th>
<th>薪水</th>
</tr></thead>
<tbody>
<tr>
<td>約翰·史密斯</td>
<td>經(jīng)理</td>
<td>$50,000</td>
</tr>
<tr>
<td>瑪麗·安</td>
<td>工程師</td>
<td>$40,000</td>
</tr>
</tbody>
</table></code>
登錄后復(fù)制 |






