tags), and each row is divided into several cells (defined by tags). The letters td refer to table data, the contents of data cells. Data cells can contain text, pictures, lists, paragraphs, forms, horizontal lines, tables, and more.
A simple HTML table consists of the table element and one or more tr, th, or td elements.
The tr element defines the table row, the th element defines the header, and the td element defines the table cell.
More complex HTML tables may also include caption, col, colgroup, thead, tfoot, and tbody elements.
htmlTable tag
Tag |
Description |
|
Define the table title. |
|
Define the attribute values of one or more columns in the table. |
|
Define the column group in the table for formatting. |
Define table. |
|
Define the body content in the table. |
|
|
Define the cells in the table. |
|
Define the table note content (footnote) in the table. |
|
|
Define the header cell in the table. |
Define the header content in the table. |
|
Define the rows in the table. |
|
Example: <table border="1">
<caption>人物信息</caption>
<tr>
<th>姓名</th>
<th>年龄</th>
</tr>
<tr>
<td>Peter</td>
<td>20</td>
</tr>
<tr>
<td>Lois</td>
<td>20</td>
</tr>
</table>
Related recommendations: "html video tutorial》
|
|