Paul D. Waite Paul D. Waite - 1 year ago 78
HTML Question

What’s the correct scope value to use for an HTML <th> table cell than spans several columns?

Say you’ve got an HTML table, with a

cell that spans several columns, e.g.

<th colspan="3" scope="?">Scores</th>
<!-- ...more headings here... -->
<th scope="col">English</th>
<th scope="col">Maths</th>
<th scope="col">Science</th>
<!-- ...more sub-headings here... -->
<!-- ...more cells here... -->

What’s the correct value for the scope attribute for the spanning header cell?
seems incorrect as it’s heading several columns, but
does’t seem right if I don’t actually have any

Answer Source

According to the second example table in the HTML spec, it’s colgroup, despite the lack of colgroup tags.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download