There are two ways of table layout:
1.HTML Table ( <table> label) and 2. CSS Table ( display:table and other related properties).
HTML table refers to the use of native <table> tags, while CSS table refers to the model that mimics HTML tables with CSS properties.
The correspondence between the two is roughly as follows:
- Table { display: table }
- TR { display: table-row }
- Thead { display: table-Header-group }
- Tbody { display: table-Row-group }
- Tfoot { display: table-footer-group }
- Col { display: table-column }
- Colgroup { display: table-column-group }
- TD, th { display: table-cell }
- Caption { display: table-caption }
L Use the attributes listed above to facilitate many functions:
such as: block element Vertical center:Display:table-cell; Vertical-align:middle; There have been special generalizations about the centering of elements.
CSS Table layout