I made two versions of HTML files for this project:
The first was made with scope attribute:
And the second with id and headers attributes:
Thank you for your time!
I made two versions of HTML files for this project:
The first was made with scope attribute:
And the second with id and headers attributes:
Thank you for your time!
Hi @das.serban
Nice work! Only some minor point for the “scope” version. The “headers” version has some bigger problems.
“scope” version:
<caption>
needs to be the first child of <table>
to be valid HTML.<colgroup>
we need to list all columns. Instead of writing nine <col>
at the end we could also use the span
attribute: <col span="9">
.scope="row"
. Although it has colspan="2"
it only targets one row.“headers” version:
The first two point from above also apply to this version, but he main problem is that you have multiple duplicate IDs and some IDs also have spaces which is not allowed. It seems you kind of mixed up the content of id
and headers
sometimes. Generally, every <th>
should have a unique ID and every <td>
should have a space-separated list of IDs from all row and column headers that apply to it (in this exercise up to four).
Recently, another learner also did a “headers” version. Maybe you want to have a look at their solution: https://codepen.io/Petrushya/pen/JjLOdNz
See you,
Michael
I understand the principle. That was also the purpose of trying both versions to see if I understood how ids with headers work. Thank you very much!