Assessment wanted for Structuring planet data under HTML tables

Hello,
This is Frozin Faya, who is also a learner of Mozilla learn. I’m here for you to assess my work of which I was ask to do by Mozilla learn.

This is my work on codepen
Thank you!!!

Hi @Frozin_Faya_Gh! Welcome to the community, and thank you for sending your code in! This looks pretty much perfect — the only thing I can see that I’d give you a tip about is this line:

<th colspan="2" scope="rowgroup"> Dwarf planets</th>

Because this heading is only a heading over one single row, it should probably have scope="row".

But that’s really just a nitpick. Well done on some great work here.

Thank you sir, for assessing my work.

But I made it rowgroup because there is another sub-heading under it as you said with heading which has another heading under it should be rowgroup or colgroup

I think I have to go back and read again, maybe I misapprehended what I read.

THANK YOU for your time!!!

I think it should still be “row” — there is another heading underneath it (a subheading), but still only one — it is still only a heading over one row.

This is what I wrote about it in the tutorials: https://developer.mozilla.org/en-US/docs/Learn/HTML/Tables/Advanced#The_scope_attribute

The spec that defines it is not very clear: https://html.spec.whatwg.org/multipage/tables.html#attr-th-scope

Thank you very much. I have understood.

I only employ the row/colgroup if the heading is for multiple row/col with regards of having sub-headings or not.

THANK YOU very much