In HTML, a table consists of three parts: "
" label, row label "
", and cell label " " or " ". The " " tag defines the table, the "
" tag defines the rows in the table, the " " tag defines the standard cells, and the " " tag defines the header cell.
The operating environment of this tutorial: Windows 7 system, HTML5 version, Dell G3 computer.
In HTML, tables are defined by
tags. Each table has a number of rows (defined by the
tag), and each row is divided into a number of cells (defined by the or tag). HTML tables have two cell types:
Header cell - contains header information (created by
element) Standard cell - contains data (created by
element) The letters td refer to table data, that is, the content of the data cell.
Data cells can contain text, pictures, lists, paragraphs, forms, horizontal lines, tables, etc.
Form example:
<table border="1"> <tr> <th>姓名</th> <th>年龄</th> </tr> <tr> <td>Peter</td> <td>20</td> </tr> <tr> <td>Lois</td> <td>20</td> </tr> </table>Copy after login
Recommended tutorial: "html video tutorial"
The above is the detailed content of What three parts does a table in html consist of?. For more information, please follow other related articles on the PHP Chinese website!