6.列表标签

<html>
	<head>
		<title>表格标签</title>
	</head>
	<body>
		<table border="1" width="50%" height="40%" align="center" bgcolor="green" background="images/a1.jpg">
			<caption>详细情况</caption>
			<tr align="center">
			<!--
				<td>11</td>
				<td>12</td>
				
			-->
				<th>姓名</th>
				<th>年龄</th>
			</tr>
			<tr>
				<td rowspan="2">21</td>
				<td>22</td>
			</tr>
			<tr>
				
				<td>32</td>
			</tr>
			<tr>
				<td colspan="2">41</td>
			</tr>
		</table>
	</body>
</html>

<!-- 
	表格标签
		table:声明表格
			常用的属性:
				border:表框的厚度
					border="1
				width:
				height:
				align:表格的对齐方式
				bgcolor:背景颜色
				background:背景图片
			常用的子标签
				tr:行
					注意:至少存在一个td或者th
					常用属性:
						align:文字的对齐方式
				td:列
					常用属性:
						align:文字的对齐方式
						rowspan:行间单元格合并
						colspan:列合并
				th:表头
				caption:表格的标题
					特点:必须跟在table之后
		    tbody thead tfoot
			值得注意:
				三个一起出现
				顺序:thead tfoot tbody
-->

  

posted @ 2017-12-15 15:44  一日看尽长安花cxjj  阅读(87)  评论(0)    收藏  举报