慕田峪95761
2020-06-15 00:00
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>使用thead、tbody、tfoot标签</title>
</head>
<body>
<table border="1px">
<header>
<td>科目</td>
<td>分数</td>
</header>
<tbody>
<tr>
<td>语文</td>
<td>99</td>
<tr>
<td>数学</td>
<td>60</td>
</tbody>
<tfoot>
<td>总分<td>
<td>159</td>
</tfoot>
</table>
<tboy></tboy>
<tfoot></tfoot>
</body>
</html>
<!DOCTYPE html><html><head> <meta charset="UTF-8"> <title>使用thead、tbody、tfoot标签</title></head><style type="text/css"> caption{ color:blue; font-size:20px; }</style><body> <table border="1"> <caption>成绩表</caption> <thead> <tr> <th>科目</th> <th>分数</th> </tr> </thead> <tbody> <tr> <td>语文</td><td>99</td> </tr> <tr> <td>数学</td><td>60</td> </tr> </tbody> <tfoot> <tr> <td>总分</td><td>159</td> </tr> </tfoot> </table> </body></html>
<!DOCTYPE html><html><head> <meta charset="UTF-8"> <title>使用thead、tbody、tfoot标签</title></head><style type="text/css"> caption{ color:blue; font-size:20px; }</style><body> <table border="1"> <caption>成绩表</caption> <thead> <tr> <th>科目</th> <th>分数</th> </tr> </thead> <tbody> <tr> <td>语文</td><td>99</td> </tr> <tr> <td>数学</td><td>60</td> </tr> </tbody> <tfoot> <tr> <td>总分</td><td>159</td> </tr> </tfoot> </table> </body></html>
分享一下我的代码,错误的你们指出一下,对的话供你们参考
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>使用thead、tbody、tfoot标签</title>
</head>
<body>
<table>
<thead>
<tr>
<th>科目</th>
<th>分数</th></tr>
</thead>
<tbody>
<tr>
<td>语文</td>
<td>99</td></tr>
<tr>
<td>数学</td>
<td>60</td></tr>
</tbody>
<tfoot>
<tr>
<td>总分</td>
<td>159</td></tr>
</tfoot>
</table>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>使用thead、tbody、tfoot标签</title>
</head>
<body>
<table border="1">
<thead>
<tr>
<td>科目</td>
<td>分数</td>
</tr>
</thead>
<tbody>
<tr>
<td>语文</td>
<td>99</td>
</tr>
<tr>
<td>数学</td>
<td>60</td>
</tr>
</tbody>
<tfoot>
<tr>
<td>总分</td>
<td>159</td>
</tr>
</tfoot>
</table>
</body>
</html>
你这错误好多。。。检查检查你的tr吧tr标签是控制行的看看我的代码
<!DOCTYPE html><html><head> <meta charset="UTF-8"> <title>使用thead、tbody、tfoot标签</title></head><body> <h3>成绩表</h3><hr /> <table border="1px"> <thead> <tr> <th>科目</th> <th>分数</th> </tr> </thead> <tbody> <tr> <td>语文</td> <td>99</td> </tr> <tr> <td>数学</td> <td>60</td> </tr> </tbody> <tfoot> <tr> <td>总分</td> <td>159</td> </tr> </tfoot> </table></body></html>
找到问题了不好意思,总分那行少加/了
初识HTML(5)+CSS(3)-升级版
1225808 学习 · 18234 问题
相似问题
回答 2
回答 4