自由练习打卡ing
来源:4-8 自由编程
听风诉说
2021-01-27 22:34:19
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<table border="1" width="600px" height="300px">
<caption>课程表</caption>
<thead>
<tr>
<td></td>
<td>星期一</td>
<td>星期二</td>
<td>星期三</td>
<td>星期四</td>
<td>星期五</td>
</tr>
</thead>
<tbody>
<tr>
<th rowspan="2">上午</th>
<th>语文</th>
<th>数学</th>
<th>外语</th>
<th>数学</th>
<th>语文</th>
</tr>
<tr>
<th>数学</th>
<th>外语</th>
<th>语文</th>
<th>历史</th>
<th>政治</th>
</tr>
<tr>
<th colspan="6"></th>
</tr>
<tr>
<th rowspan="2">下午</th>
<th>历史</th>
<th>体育</th>
<th>音乐</th>
<th>政治</th>
<th>美术</th>
</tr>
<tr>
<th>班会</th>
<th>自习</th>
<th>自习</th>
<th>自习</th>
<th>自习</th>
</tr>
</tbody>
<tfoot>
<tr>
<th colspan="6">晚自习</th>
</tr>
</tfoot>
</table>
</body>
</html>
1回答
好帮手慕阿园
2021-01-28
同学你好,同学的代码整体完成的不错,但是还有几个地方需要注意
1、星期一到星期五为列标题,是需要加粗显示,而其他学科文字不属于标题,并且需要向左显示
所以星期一到星期五使用<th>标签,其余的使用<td>标签即可
注:<th></th>标签是表格的表头,表头部分会默认加粗
祝学习愉快~
相似问题