<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>使用thead、tbody、tfoot标签</title>
</head>
<body><hr>
<table border="3">
<caption>成绩表<hr></caption>
<style>
caption{font-size:24px;
</style>
<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>
<style> caption{font-size:24px; </style>
这个是放在头部标签<head></head>里面的,还有就是<styie type="text/css">
caption{font-size:24px; </style> 这样写才规范
样式style是放在头部里面的
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>使用thead、tbody、tfoot标签</title>
</head>
<body>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>使用thead、tbody、tfoot标签</title>
</head>
<body>
<h2>成绩表</h2>
<table border="1">
<thead>
<tr>
<th>科目</th>
<th>分数</th>
</tr>
</thead>
<tbody>
<tr>
<td>语文</td>
<td>99</td>
</tr>
</tbody>
<tr>
<td>数学</td>
<td>60</td>
</tr>
<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>
<style>
caption{font-size:24px;
</style>
</head>
<body><hr>
<table border="3">
<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>
<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>
<style>
caption{font-size:24px;}
</style>
这块应该放在head里面