What is the attribute "scope" for?

Hi guys,

https://www.codecademy.com/paths/front-end-engineer-career-path/tracks/fecp-22-fundamentals-of-html/modules/wdcp-22-learn-html-tables/lessons/html-tables/exercises/table-headings

One thing I don’t get: What are the cases, the attribute scope (e.g. “Company Name”) is used for? It does not affect the actual depiction of the website am I right? Is it important for Google / crawling / other technical aspects?

Already saw this thread with the same question: Scope Attribute

But there were not really any answers…

Thanks and have a nice week!

As I understood, the “scope” attribute is used mainly for screen readers to clarify if the part of the table is a row or column. This is almost like an “alt” attribute for the image in the browser (when the image is displayed correctly): if the user can’t see the picture and uses screen reader, the screen reader will explain what the image depicts using the description written in the “alt” attribute.

2 Likes

Thanks for clarifying! This helps! :slight_smile:

1 Like