<Tablewidth= "+"Height= " the"Border= "1"bgcolor= "Blue"> <caption>I'm the head of the table</caption> <TR> <th>Haha 1</th> <th>Haha 2</th> <th>Haha 3</th> </TR> <TR> <TDbgcolor= "Red">4</TD> <TD>5</TD> <TD>6</TD> </TR> <TR> <TDcolspan= "3">2</TD> <!--<td>2</td> <td>3</td> - </TR> </Table>
I'm the head of the table
haha 1 |
haha 2 |
haha 3 |
4 |
5 |
6 |
2 |
Table can be directly set the width and height of the background color border length
The caption label is a table header and does not occupy table space.
The TR represents a row, th/td represents a cell, a cell can be set colspan= "x" Implementation spans multiple columns, and the rowspan implementation spans multiple rows and can also set the background color of this cell.
The text alignment in the table is achieved by setting the align= "left, right, center".
Previous contact with the front end is from the table learning, then feel very interesting, just a few lines of code can achieve a table function, now feel table too low, are too lazy to write.
Of course the table layout still has a certain disadvantage:
(1) The table layout consumes more bytes and affects the loading speed.
(2) Table layout is cumbersome and time-consuming, which is not conducive to design thinking, affecting the developer reading experience.
(3) Not conducive to browser order rendering.
Table layout in HTML