Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML HTML Tables Structuring Tables The Table Head and Body Elements

Henrique Zafniksi
Henrique Zafniksi
8,560 Points

I've read the attribute "scope" is now deprecated and is not supported by HTML5. Should we use it? If yes, why?

Not supported by HTML5

HTML5 Deprecated Tags and Attributes at 'Tutorials Point' states that the attribute "scope" for the "td" element has been permanately removed. I'm no expert but you can check it out for yourself at "Tutorials Point".

3 Answers

Andrew Rickards
Andrew Rickards
18,877 Points

According to the W3C recommendation here http://www.w3.org/TR/html5/index.html#attributes-1, the scope attribute on th elements is still valid.

It is supported for th just not td (As far as I have read)

Though after reading what scope is used for more closely I would have to go with @Tyler Dix and say not use it for anything but th elements as it is used by screen readers mostly and should be used to help visually impaired navigate a table. So having a few unnecessary row or col scope attributes in td may make it more confusing for the impaired.

However this is just my personal take on this!

Tyler Dix
Tyler Dix
14,230 Points

No, you should absolutely not use it. Doing so will result in compatibility issues with multiple browsers. Assuming you read this from a credible source, I recommend not using the scope attribute or any other attribute listed as deprecated for web development.

Hope that helps.

Ronald Lira
Ronald Lira
12,217 Points

There are some attributes that have been deprecated in HTML5, but scope is definitely not one of them. You should check a reliable source first before putting your word on it. https://developer.mozilla.org/en-US/docs/Web/HTML/Element/th

I would not consider myself a professional with knowledge on what to use and what not to use but personally I would say depending on how you generate your HTML code server sided you should still use scope for browsers that do not support html5.

Having some sort of check on what they are using before generating and sending them the webpage. When a user is using outdated software you will most likely still be using outdated attributes/methods/etc...

From what I was reading at TP, the attribute scope in the td tag has been completely removed. So it would be pointless to be sending this data to a computer that is using HTML5.

Hopefully someone more experienced has a better answer though!