What does colspan actually do? | Sololearn: Learn to code for FREE!

+1

What does colspan actually do?

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

4/11/2019 3:57:00 PM

Oh Boi!

3 Answers

New Answer

+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!

+2

Oh..it is clear now.Thanks a lot!

+2

now try grid css way better