Learn-html-tables, table-headings

What exactly is the use of the scope attribute because the position of a cell in a row is quite descriptive plus the code works fine without it, or does it in anyway affect the styling of that element?

" The scope attribute has no visual effect in ordinary web browsers, but can be used by screen readers."

From W3Schools article on scope attribute.

1 Like

"The scope attribute tells the browser and screen reader that everything under the column is related to the header at the top, and everything to the right of the row header is related to that header. "
From Scope attribute should be used correctly on tables

I think it especially makes sense if the header is not in the first row or column of the table. :thinking:

1 Like