Skip to content

Tables with Irregular Headers - full code example does not match code on source page #1822

@pfw-fredricg

Description

@pfw-fredricg

Resource URL

https://www.w3.org/WAI/tutorials/tables/irregular/

Description

While checking for table HTML code, I noticed a discrepancy on:

Tables with Irregular Headers

https://www.w3.org/WAI/tutorials/tables/irregular/#table-with-headers-spanning-multiple-rows-or-columns

In Example 2: Table with headers spanning multiple rows or columns, there is a link below the code to a “Full code example” at https://www.w3.org/WAI/tutorials/tables/examples/scope-multiple/

  <caption>
    Poster availability
  </caption>
  <tr>
    <th scope="col">Poster name</th>
    <th scope="col">Color</th>
    <th colspan="3" scope="colgroup">Sizes available</th>
    </tr>

However the code on the full example is not the same as the code used in the Example 2 table.

  <caption>
    Poster availability
  </caption>
  <col>
  <col>
  <colgroup span="3"></colgroup>
  <thead>
    <tr>
      <th scope="col">Poster name</th>
      <th scope="col">Color</th>
      <th colspan="3" scope="colgroup">Sizes available</th>
    </tr>
  </thead>

Are both correct, or is one better than the other?

Resource Shortname

wai-tutorials

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions