Scope Attribute


#1

https://www.codecademy.com/courses/learn-html-tables/lessons/tables/exercises/table-headings?action=resume_content_item&course_redirect=learn-html

the use of the scope attribute, which can take one of two values:

row - this value makes it clear that the heading is for a row.
col - this value makes it clear that the heading is for a column

I didn’t see any visual change if remove scope attribute what exactly the real world use of it?


#2

Both attributes simply display the row and column of a table. I’ve tried changing the code in the text editor to see the changes that you mentioned you haven’t noticed, and I haven’t noticed them as well. Maybe the browser on codeacademy’s end isn’t responding properly. In a real world example, here’s a link from w3schools, https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_col_test


#3

But that example is nowhere using row and col attribute with th tag else its using colgroup tag…my question was about row and col attribute only what necessary changes they made?


#4

Before:

Screenshot_2018-04-04_11-42-50

if we then remove colspan of adams greenworks and press run to reflect the changes we get:

Screenshot_2018-04-04_11-43-32

now adam is no longer spanning two columns, i think its quite a change (visually as well)


#5

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.