HTML learning table
Create a table in HTML:
§ Use tables to divide the page layout
Format:
..
One row of data in the table |
Two rows of data in the table |
Three rows of data in the table |
The test example is as follows:
One row of data in the table |
One row of data in the table |
Two rows of data in the table |
Two rows of data in the table |
Three rows of data in the table |
Three rows of data in the table |
Tag attributes:
Border
Caption
Align
Width: Set the table width.
Height: sets the table height.
Cellspacing sets the distance between cells in the table.
Cellpadding sets the spacing between cells and text.
Bordercolor: Set the table border color.
Bordercolorlight
Bordercolordark sets the dark area color of the table.
The test procedure is as follows:
One row of data in the table |
One row of data in the table |
Two rows of data in the table |
Two rows of data in the table |
Three rows of data in the table |
Three rows of data in the table |
Label attribute: bgcolor sets the background color. Align sets the row alignment mode. Valign sets the vertical alignment of cells
The test procedure is as follows:
One row of data in the table |
One row of data in the table |
Two rows of data in the table |
Two rows of data in the table |
Three rows of data in the table |
Three rows of data in the table |
And tag attributes:
Bgcolor sets the background color of the Unit.
Rowspan sets the number of rows occupied by cells.
Colspan sets the number of columns occupied by cells.
Align
Valign sets the vertical alignment of cells
Width: Set the cell width.
Height: sets the cell height.
The test procedure is as follows:
One row of data in the table |
One row of data in the table |
Two rows of data in the table |
Two rows of data in the table |
Three rows of data in the table |
Three rows of data in the table |
Rowspan
One row of data |
First line of data |
Second row of data |
Row 3 |
Colspan
First line of data |
Second row of data |
Second row of data |
Row 3 |
Row 3 |
Th
One row of data in the table |
One row of data in the table |
Two rows of data in the table |
Two rows of data in the table |
Three rows of data in the table |
Three rows of data in the table |