What does colspan actually do? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What does colspan actually do?

I dont get seem a clear picture of colspan in a table.

11th Apr 2019, 3:57 PM
Oh Boi!
Oh Boi! - avatar
3 Answers
+ 7
Colspan is used to span a cell over other cells (horizontally). Suppose we have a table like this | 1 | 2 | | | 3 | 4 | 5| If we applied colspan="2" attribute to td(2) the table will be like this | 1 | 2 | | 3 | 4 | 5| And if we applied colspan= "3" | 1 | 2 | | 3 | 4 | 5| | That's it!
11th Apr 2019, 4:05 PM
Seniru
Seniru - avatar
+ 2
Oh..it is clear now.Thanks a lot!
11th Apr 2019, 5:02 PM
Oh Boi!
Oh Boi! - avatar
+ 2
now try grid css way better
12th Apr 2019, 12:53 AM
Jason Kennedy