我正在尝试制作一个与此类似的 html 表格:
我对表格的数据不感兴趣,只对准系统感兴趣:可能性、后果、列名称(次要、中等)和行(几乎确定、可能等)。
这是我目前所拥有的:http://jsfiddle.net/PQHR6/
我不知道如何制作那些Likelihood
和Consequence
header
最佳答案
您需要将 th
与属性 colspan
一起使用。
<tr>
<th>Table header</th>
<th colspan="5">Table header</th>
</tr>
<tr>
<th> <!-- EMPTY --></th>
<th>Minor</th>
<th>Lorem 1</th>
<th>Lorem 2</th>
<th>Lorem 3</th>
<th>Lorem 4</th>
</tr>
<tr>
<th>Almost Certain</th>
<td>Table cell 1</td>
<td>Table cell 2</td>
<td>Table cell 3</td>
<td>Table cell 4</td>
<td>Table cell 5</td>
</tr>
jsfiddle:http://jsfiddle.net/nPQfz/
关于html - 如何创建带有列和行部分标题的 html 表格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14962836/