HTML TABLE | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
- 1

HTML TABLE

I have an html table with two row with four column each other. I want to merge two column of the second row. How should I code?

16th May 2017, 10:21 AM
Joas Dioniz
Joas Dioniz - avatar
6 Answers
+ 1
<table> <tr> <td colspan="2"></td> </tr> <table>
16th May 2017, 10:28 AM
Nikola Stojiljkovic
Nikola Stojiljkovic - avatar
+ 3
<table> <tr> <td>cell 1</td> <td>cell 2</td> </tr> <tr> <td colspan="2">cell 3</td> </tr> </table>
16th May 2017, 10:31 AM
Loai Hazima
Loai Hazima - avatar
+ 2
@Nikola: I think that @Loai wanted show example of a table with at least one row without colspan ( as colspan isn't necessary if only one row ;P )
16th May 2017, 10:55 AM
visph
visph - avatar
+ 2
He corrected code in meanwhile xD @visph
16th May 2017, 10:58 AM
Nikola Stojiljkovic
Nikola Stojiljkovic - avatar
+ 1
use attribute colspan :)
16th May 2017, 10:25 AM
Nikola Stojiljkovic
Nikola Stojiljkovic - avatar
0
You do not need on top <tr> and <table>, it is unnecessary @Loai :)
16th May 2017, 10:32 AM
Nikola Stojiljkovic
Nikola Stojiljkovic - avatar