Colspan | Sololearn: Learn to code for FREE!

+4

Colspan

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

4/17/2018 9:43:16 PM

Pavel

2 Answers

New Answer

+5

i also dont understand the colspan but that answer helped me. :)

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