html cell merge

1. The colspan attribute of td indicates the number of columns occupied by the cell.

2. The rowspan attribute of td indicates the number of rows occupied by the cell.

Once it occupies multiple columns, the next row does not need to be in the corresponding place td

<body>
		<table border="15px" align="center" width="400px" height="400px" cellpadding="15px"
			cellspacing="0px">
			<tr>
				<td colspan = "2" align="center">学生号</td>
			</tr>
			
			<tr>
				<td rowspan="2" width="200px">学历</td>
				<td width="200px">专业</td>
			</tr>
			
			<tr>
				<td colspan = "2">毕业院校</td>
			</tr>
		</table>
	</body>

 

Guess you like

Origin blog.csdn.net/xushiyu1996818/article/details/112690554