The <colspan> tag inside a <th> or <td> tag is used to span the columns.Let us see an example. Example:<html><body><h4>Cell that spans two columns:</h4><table border="1"><tr> <th>Name</th> <th colspan="2">Telephone</th></tr><tr> <td>Charles Babbage</td> <td>555 89 123</td> <td>555 98 321</td></tr></table></body></html>
HTML
Topic: Tables
How to have a table cell that spans two columns in HTML?
Browse random answers:
How to create tables in an HTML document?
Can I use percentage values for <TD WIDTH=...>?
Explain the <th> tag?
Can I nest tables within tables?
Why doesn't <TABLE WIDTH="100%"> use the full browser width?
Why is there extra space before or after my table?
How do I align a table to the right (or left)?
How can I use tables to structure forms?
How do I center a table?
Why doesn't <TABLE WIDTH="100%"> use the full browser width?
Why is there extra space before or after my table?
What are the differences between cell spacing and cell padding?
How do I align a table to the right (or left)?
How can you provide heading to a table?
How to have a table cell that spans two columns in HTML?
What is the relationship between the border and rule attributes?