Rowspan and colspan seem backwards to me

https://www.codecademy.com/courses/learn-html/lessons/tables/exercises/rowspan?action=resume_content_item

This is the lesson I am on and I’m confused because when using the rowspan attribute, I find it goes against everything i’ve been taught when it comes to graphs. Rows are horizontal and columns are vertical in graphs however, in html the rowspan attribute spans data vertical, and the colspan attribute organizes data vertically… I was wondering why this is and if anyone else struggled with this confusing aspect of HTML before as a beginner? Thank you.

rowspan spans multiple horizontal rows and colspan spans multiple vertical columns.

4 Likes

I don’t actually see how columns and rows are reversed in this case.

What the attribute says is: this cell takes up the height/width of x rows/columns


<td rowspan='2'>...</td> <!-- cell is 2 rows high -->
<td colspan='2'>...</td> <!-- cell is 2 columns wide -->
5 Likes