+ 4


hello, who can explain to me in an easy way the colspan, and why is it written in this example https://www.sololearn.com/Play/HTML colspan=2, not 3, 4, 5 or ....n etc? And when i enter colspan=4 for example it has the same result as colspan=2

17th Apr 2018, 9:43 PM
2 Answers
+ 5
i also dont understand the colspan but that answer helped me. :)
22nd Apr 2018, 5:00 PM
Arthur Abreu
Arthur Abreu - avatar
+ 4
The colspan attribute is generally used to specify how many cells one column will take up in your table. For example, if you were to have a 5x4 table with the first element having a colspan of 5, the cell will span across the entire table, getting rid of the separator between the cells for that section. I would recommend checking out these websites as they both explain its usage very clearly - https://www.w3schools.com/tags/att_td_colspan.asp https://html.com/tables/rowspan-colspan/
18th Apr 2018, 2:37 AM
Faisal - avatar