Correcting teacher:PHPz
Correction status:unqualified
Teacher's comments:表不完整,最后一行的最右边一列可以写出,让最后两列合并,更加美观。
1.元素
2.标签
3.属性
标签是元素的功能,属性是元素的特征
下面做一个表
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>html表格</title>
</head>
<body>
<table border="1px" width="60%">
<!-- 表头 -->
<thead>
<caption style="font-size: 23px;">商品信息表</caption>
</thead>
<!-- 表内容 -->
<tbody>
<tr>
<td width="15%">id</td>
<td>品名</td>
<td>价格(元)</td>
<td>数量(个)</td>
<td>金额(元)</td>
<td>手机类别</td>
</tr>
<tr>
<td>1</td>
<td>iphone12</td>
<td>6000</td>
<td>3</td>
<td>18000</td>
<td rowspan="3" style="text-align: center;">苹果</td>
</tr>
<tr>
<td>2</td>
<td>iphone11</td>
<td>4000</td>
<td>3</td>
<td>12000</td>
<!-- <td>金额(元)</td> -->
</tr>
<tr>
<td>3</td>
<td>iphone10</td>
<td>3000</td>
<td>3</td>
<td>9000</td>
<!-- <td>金额(元)</td> -->
</tr>
<tr>
<td>4</td>
<td>华为mate40</td>
<td>6000</td>
<td>3</td>
<td>18000</td>
<td style="text-align: center;">华为</td>
</tr>
<tr>
<td>合计</td>
<td colspan="3" style="text-align: center;">总金额</td>
<!-- <td>6000</td>
<td>3</td> -->
<td>75000</td>
</tr>
</tbody>
<!-- 表底 -->
</table>
</body>
</html>