+ 1
Why is colspan used in table tag in html...
I have tried to adjust the colspan in html from 2 to 50 but it does not show any changes in the output.. 😖😖😖
9 Respuestas
+ 6
It means that the cell spans two columns instead of one. You have to use it in the <td></td> tags, not in <table></table>.
Without colspan, every cell has the same width:
______ ______ ______
|______|______|______|
|______|______|______|
|______|______|______|
If you use colspan = 2 for the first cell in the second row, it will look like this:
______ ______ ______
|______|______|______|
|____________.|______|
|______|______|______|
Now, the first cell in the second row uses two columns instead of one and there's only two cells in the second row (instead of three).
Same with rowspan:
______ ______ ______
|______|______|______|
|______|______| |
|______|______|______|
(last cell spans two rows instead of one)
+ 2
sameer poswal Thank you! Of course you can follow me. I'm not a pro in html though ☹️
+ 1
please help me.. I am unable to understand it.
+ 1
Anna cool tables🤓.
+ 1
thanks Anna love you😙😙
+ 1
can I follow you Anna..if I need more help from you..🙏🙏
+ 1
ohh thanks can you follow me back..
+ 1
is that you in the profile photo
0
Remember to drop (leave out or remove) the tds (or ths) you are spanning across.
For reference:
https://www.w3schools.com/tags/att_colspan.asp