Basic HTML

 
 
          

Table >> Spanning >> Column Span

 

Column Span

To apply column span on your table cells, use the property colpan="" to your <td> or <th> tag


Here are some examples:

HTML - Code Description Sample Output
<table border=1 width=100>
<tr>
<td colspan=2>Numbers
<tr>
<td>1
<td>2
</table>
  • Border = 1
  • Width = 100
  • Numbers
    1 2
    <table border=1 width=100>
    <tr>
    <td colspan=3>Letters
    <tr>
    <td>A
    <td>B
    <td>C
    </table>
  • Border = 1
  • Width = 100
  • Letters
    A B C
    <table border=1 width=200>
    <tr>
    <td colspan=5>Numbers and Letters
    <tr>
    <td colspan=2>Numbers
    <td colspan=3>Letters
    <tr>
    <td>1
    <td>2
    <td>A
    <td>B
    <td>C
    </table>
  • Border = 1
  • Width = 200
  • Numbers and Letters
    Numbers Letters
    1 2 A B C

    Table >> Spanning >> Row Span Table >> Caption