An accessible data table

Headers tied to cells.

HTML · An accessible data tableIntermediate
<table>
  <caption>Plans and prices</caption>
  <colgroup><col><col span="2"></colgroup>
  <thead>
    <tr><th scope="col">Plan</th><th scope="col">Monthly</th><th scope="col">Yearly</th></tr>
  </thead>
  <tbody>
    <tr><th scope="row">Basic</th><td>$5</td><td>$50</td></tr>
    <tr><th scope="row">Pro</th><td>$12</td><td>$120</td></tr>
  </tbody>
</table>
tablescopecaptioncolgroup