'span' sets the number of columns in a group : table colgroup « Tags « HTML / CSS






'span' sets the number of columns in a group

  
    
<HTML>
<BODY>
<table border="3" cellspacing="5" cellpadding="5">
   <colgroup>
      <col span="3" align="left" style="color:red; font-weight:bold">
      <col span="1" align="center" style="color:green">
      <col span="2" align="right" style="color:blue">
         <tr>
            <td>Column 1</td>
            <td>Column 2</td>
            <td>Column 3</td>
            <td>Column 4</td>
            <td>Column 5</td>
            <td>Column 6</td>
         </tr>
         <tr>
            <td>Cell 1</td>
            <td>Cell 2</td>
            <td>Cell 3</td>
            <td>Cell 4</td>
            <td>Cell 5</td>
            <td>Cell 6</td>
         </tr>
</table>
</BODY>
</HTML>  

    
      
        
    
  








Related examples in the same category

1.'colgroup' Example
2.colgroup span="10"
3.Using colgroup to group columns
4.colgroup and col tags are used to format entire columns
5.Column Groups
6.Table with column group