This exercise discusses the `scope` attribute. What is the purpose of the scope attribute and are row and col the only values this attribute can have?


#1

Question

This exercise discusses the scope attribute. What is the purpose of the scope attribute and are row and col the only values this attribute can have?

Answer

The scope attributeis used by screen readers to enhance accessibility for visually impaired users. In addition to the row and col values shown in this exercise, thescope` attribute can also have the following values:

  1. rowgroup: used for table headings that group multiple rows.
  2. colgroup:used for table headings that group multiple columns.
  3. auto: the default value

In lessons 8 and 9 you will learn how to create cells that span multiple rows or columns. For improved accessibility, we should use the appropriate rowgroup and colgroup values within these headings.


FAQ: Learn HTML Tables - Tables - Table Headings