htmlHow to merge tables: First create an HTML sample file; then create a table through table; then use the rowspan attribute to merge two or more rows; finally use the colspan attribute to merge two or more columns into Just one column.
The operating environment of this article: Windows7 system, HTML5&&CSS3 version, DELL G3 computer
HTML table and cell merging
nbsp;html> <meta> <title>HTML的表格</title> <center><h1>员工信息表</h1></center> <hr> <!--表格,border="1px"表示设置表格边框为1像素-->
a1 | a2 | a3 |
b1 | b2 | b3 |
c1 | c2 | c3 |
1. If you want to merge two or more rows, you will use rowspan attribute.
2. If you want to combine two or more columns into one column, the colspan attribute will be used.
nbsp;html> <meta> <title>表单元格合并</title>
a1 | a2 | a3 |
b1 | b2 | b3c3 |
c1c2 |
1. The header cell of the table is defined using the <th> tag. <br>2. The header cell attributes of the table are mainly public attributes, such as: <code>align
, dir
, width
, height
.
3. Most browsers will display the table header as bold and centered text.
nbsp;html> <meta> <title>表单元格合并</title>
姓名 | 性别 | 年龄 |
---|---|---|
a1 | a2 | a3 |
b1 | b2 | b3c3 |
c1c2 |
Recommended study: "HTML video tutorial"
The above is the detailed content of How to merge tables in html. For more information, please follow other related articles on the PHP Chinese website!