Correcting teacher:PHPz
Correction status:qualified
Teacher's comments:
实例代码直接给上,直接下面复制,然后按tab补全即可
<table>caption{表格标题}+(thead>tr>th{表格第一行内容}8)+(tbody>tr5>td{表格内容})
以下代码
<!DOCTYPE html>
<html lang="zh-CN">
<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>Document</title>
</head>
<body>
<style>
table{
border-collapse: collapse;
}
caption{
font-size: 50px;
font-weight: 700;
}
/* 表头颜色 */
thead{
background-color: lightcyan;
}
td{
background-color: bisque;
}
table th,tr td{
/* 表格行间距 */
border: 1px solid;
/* 表格大小 */
padding: 15px;
text-align: center;
}
/* 表格居中和高宽 */
.mytable{
width: 900px;
height: 50px;
margin: 0 auto;
}
/* 单元格高宽 */
.myth{
width: 50px;
height: 30px;
}
</style>
<!-- table>caption{内容}+(thead>tr>th{表格第一行内容}*8)+(tbody>tr*>td{表格内容}*5) -->
<body>
<table class="mytable">
<caption>HTML表格案例</caption>
<thead>
<tr>
<th>序号</th>
<th>日期</th>
<th>收据编号</th>
<th>金额</th>
<th>客户名称</th>
<th>领用签字人</th>
<th>归还日期</th>
<th>备注</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>2022.7.1</td>
<td>455678451</td>
<td>4</td>
<td>php中文网</td>
<td>张飞</td>
<td>2022.7.2</td>
<td>HTML表格案例</td>
</tr>
<tr>
<td>2</td>
<td>2022.7.1</td>
<td>455678451</td>
<td>4</td>
<td>php中文网</td>
<td>张飞</td>
<td>2022.7.2</td>
<td>HTML表格案例</td>
</tr>
<tr>
<td>3</td>
<td>2022.7.1</td>
<td>455678451</td>
<td>4</td>
<td>php中文网</td>
<td>张飞</td>
<td>2022.7.2</td>
<td>HTML表格案例</td>
</tr>
<tr>
<td>4</td>
<td>2022.7.1</td>
<td>455678451</td>
<td>4</td>
<td>php中文网</td>
<td>张飞</td>
<td>2022.7.2</td>
<td>HTML表格案例</td>
</tr>
<tr>
<td>5</td>
<td>2022.7.1</td>
<td>455678451</td>
<td>4</td>
<td>php中文网</td>
<td>张飞</td>
<td>2022.7.2</td>
<td>HTML表格案例</td>
</tr>
</tbody>
</table>
</body>
</html>