Switch to full style
HTML code examples
Post a reply

colspan attribute usage

Sun Feb 26, 2012 8:44 pm

In this example we show the colspan attribute usage with table td tags. It is used to span cells for more than one columns.
Code:
<html>

<
head>
  <
title>Table colspan usage</title>
   <
style type="text/css">
 

table  {
  
border-collapseseparate;
  
border:1px solid red;
}
 
 
table td
{
  
border1px solid #EEFF11;
}
  </
style>
</
head>

<
body>
<
table>
  <
caption>Table with colspan attribute</caption>
  <
tr>
    <
td colspan="2" Spaned column</td>
    <
td colspan="3" Spaned column</td>
  </
tr>
  <
tr>
    <
td>Row 2 data1</td>
    <
td>Row 2 data2</td>
  </
tr>
  <
tr>
    <
td>Row 3 data1</td>
    <
td>Row 3 data2</td>
  </
tr>
  
</
table>

</
body>
</
html>

    




Post a reply
  Related Posts  to : colspan attribute usage
 usage of rev attribute     -  
 usage of ch attribute     -  
 Usage of the before CSS attribute     -  
 Usage of the after CSS attribute     -  
 usage of <br> tag clear attribute     -  
 vspace attribute usage     -  
 row-span attribute usage     -  
 Usage of contenteditable attribute     -  
 usage of id attribute for link jumps     -  
 SWAP images using JQuery just by using the src attribute img     -  

Topic Tags

HTML Table