The structure of table labels and the implementation of merging cells. 1. table label structure example code: Copy the code as follows: tablecaption Information Statistics table captiontheadtrth # thtrtheadtbodytrtd1tdtrtd2tdtrtrtd
1.
The code is as follows:
Tag structureSample code:
Information Statistics table
# |
1 |
2 |
3 |
4 |
A complete example:
The code is as follows:
Information Statistics table
# |
Firstname |
Lastname |
Phone |
QQ |
1 |
Qian |
Shou |
11111111111 |
111111111 |
2 |
Qian |
Shou |
11111111111 |
111111111 |
3 |
Qian |
Shou |
11111111111 |
111111111 |
4 |
Qian |
Shou |
11111111111 |
111111111 |
2. Merge upper and lower cells (rowspan)
Sample code:
The code is as follows:
Information Statistics table
# |
Firstname |
Lastname |
Phone |
QQ |
1 |
Qian |
Shou |
11111111111 |
111111111 |
Qian |
Shou |
11111111111 |
111111111 |
3 |
Qian |
Shou |
11111111111 |
111111111 |
4 |
Qian |
Shou |
11111111111 |
111111111 |
3. Merge left and right cells (colspan)
Sample code:
The code is as follows:
Information Statistics table
# |
Firstname |
Lastname |
Phone |
QQ |
1 |
This is a merge of four cells. |
2 |
Qian |
Shou |
11111111111 |
111111111 |
3 |
Qian |
Shou |
11111111111 |
111111111 |
4 |
Qian |
Shou |
11111111111 |
111111111 |
Example code: the code is as follows: table border = "1" caption Information Statistical table/caption thead tr th #/th/tr/thead tbody tr td1/td/tr td2/td/tr td...