https://codepen.io/bawantha-madushan/pen/VwEaOXJ

In this project, I am in doubt about which value should insert to scope attribute in cells Name and Marks. Can we use both? Marks? what should be the value of scope?

Hi @bawantha358 and welcome to the community :wave:

The scope attribute tells us which cells the header relates to. Therefore you should use scope="col" on “Name”. Bawantha etc. are the names of the students. colgroup for “Marks” is fine, because it is header for all three columns of marks.

Something you could additionally do is turning the names themselves into header cells with an appropriate scope. As an example the first name could be: <th scope="row">Bawantha</th>. Now every number has three headers it relates to. So we could read the first number as: 83 is the “Mark” in “Theory” of “Bawantha”.

Does that make sense to you? Feel free to ask more questions. :slightly_smiling_face:

See you,
Michael

1 Like

Thank you for the valuable feedback!

1 Like