Tables 2

  BACK   Home NEXT | Tables 3  

Table of Contents

Spanning Cellspacing and Cellpadding Backgrounds Rules Tags Frame Tags


Spanning

&   To span ( combine ) a group of cells in the same row, type the command :

< td colspan="?">

The mark (?) is the number of cells to be spanned (combined).

   
 
     
 

Top

&   To span ( combine ) a group of cells in the same column, type the command :

< td rowspan="?">

   
 
 
   
 
 

Top

Cellspacing and Cellpadding

Click To view Cellspacing and Cellpadding examples

Backgrounds

Color Backgrounds

Top

[ 1 ]
   
   
[ 2 ]
 
 
[ 3 ]
 
 

The above color backgrounds were created by inserting < bgcolor="#ddcabd" > within   [ 1 ]   < td >  Tag   and < bgcolor="#cc9966" > within   [ 2 ]   < tr >  Tag   and < bgcolor="#e1dbad" > within   [ 3 ]   < table > Tag.

Image backgrounds

   
 
   
   

&   Similarly, the above image backgrounds were created by inserting
< background="fabric1.jpg" > within < td > Tag and
< background="cat2.jpg" > within < table > Tag.

Top

Rules Tags

On the inside, rules is used to get rid of the internal borders the lines between the cells.

[ 1 ]
   
   
   
   

[ 2 ]
  
  
 
  

[ 3 ]
  
 
   
 

&   The above tables were created by using some Rules Attributes within < table > Tag as follows :

  1. To get rid of all inside lines , use < table rules="none" >
  2. To get rid of columns, use < table rules="rows" >
  3. To get rid of rows, use < table rules="cols" >

Top

Frame Tags :

To specify which parts of the external border will display, use the frame attribute.

     
 
  • void : displays no border.
  • above : displays top border only.
  • below : displays bottom border only.
  • vsides: displays top and bottom borders.
  • hsides: displays left and right borders.
  • lhs : displays left border only.
  • rhs : displays right border only.
 
     

Click To view Frame Tag examples

  BACK   Home   Top NEXT | Tables 3