【发布时间】:2016-05-01 04:09:07
【问题描述】:
我使用https://validator.w3.org/nu/#file 来更正我的 html 课程,但我不断收到此错误
警告:表格行宽 2 列,小于第一行 (3) 建立的列数。 从第 31 行第 31 列开始;到第 32 行第 6 列 环↩↩
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Assignment 3B</title>
<style>
table, th, td {
border: 1px solid black;
background-color: #FFFFCC;
}
th, td {
width: 25%;
}
th {
height: 50px
}
th, td {
padding: 10px;
}
</style>
</head>
<body>
<table>
<tr>
<th colspan="3"> Seasons </th>
</tr>
<tr>
<td rowspan="3"> March/April </td>
<th rowspan="4"> Spring </th>
</tr>
<tr>
<td > <b> Cold </b></td>
</tr>
<tr>
<td> Warm </td>
</tr>
<tr>
<th rowspan="1">
<img src="tree1.png" alt="tree" style="width:150px;height:150px;">
</th>
<td style="background-image: url(Light_Pink_430051_i0.png)"> <b>Warm </b> </td>
</tr>
</table>
</body>
</html>
请帮帮我
【问题讨论】:
-
请张贴图片的外观,因为您的代码在匹配列和行时存在结构错误
-
请检查:developer.mozilla.org/en/docs/Web/HTML/Element/… 导致
<th>只能在第一个<tr>或<thead><tr>中 -
在看到您希望它看起来像什么的评论后,感觉使用带宽度和浮动的 div 会更好。
-
哦。这是给学校的,你需要用桌子吗?
标签: html