如何设置HTML表格中两个或更多连续行的样式?我尝试了div和span,但被忽略了,并且在表标记中看起来不允许。
我尝试的代码:
<table border="1">
<caption>Styling regions of rows</caption>
<tr>
<th>ISBN</th>
<th>Title</th>
<th>Price</th>
</tr>
<span style="background-color:yellow">
<tr>
<td>3476896</td>
<td>My first HTML</td>
<td>$53</td>
</tr>
<tr>
<td>6767455</td>
<td>My first CSS</td>
<td>$40</td>
</tr>
<tr>
<td>6775655</td>
<td>My first JavaScript</td>
<td>$50</td>
</tr>
</span>
</table>