Why is colspan used in table tag in html... | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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.. 😖😖😖

19th Sep 2018, 10:08 AM
<html>SAMEER POSWAL</html>
<html>SAMEER POSWAL</html> - avatar
9 Answers
+ 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)
19th Sep 2018, 10:40 AM
Anna
Anna - avatar
+ 2
sameer poswal Thank you! Of course you can follow me. I'm not a pro in html though ☹️
20th Sep 2018, 8:06 AM
Anna
Anna - avatar
+ 1
please help me.. I am unable to understand it.
19th Sep 2018, 10:08 AM
<html>SAMEER POSWAL</html>
<html>SAMEER POSWAL</html> - avatar
+ 1
Anna cool tables🤓.
19th Sep 2018, 10:58 AM
Akib
Akib - avatar
+ 1
thanks Anna love you😙😙
20th Sep 2018, 7:35 AM
<html>SAMEER POSWAL</html>
<html>SAMEER POSWAL</html> - avatar
+ 1
can I follow you Anna..if I need more help from you..🙏🙏
20th Sep 2018, 7:36 AM
<html>SAMEER POSWAL</html>
<html>SAMEER POSWAL</html> - avatar
+ 1
ohh thanks can you follow me back..
20th Sep 2018, 11:45 AM
<html>SAMEER POSWAL</html>
<html>SAMEER POSWAL</html> - avatar
+ 1
is that you in the profile photo
20th Sep 2018, 11:46 AM
<html>SAMEER POSWAL</html>
<html>SAMEER POSWAL</html> - avatar
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
19th Sep 2018, 12:42 PM
Janning⭐
Janning⭐ - avatar