Lesson 10:  Advance Table Tags

 

 

You can add other parameters to the table tags  to control the outlook of the table.

10.1  Table border

10.2  Table colours * you could use hexadecimal code for the color attributes.

10.3  Table Height and Width

The parameters are

   <table  width="40%" height="20%">

10.4  Spacing in a Table

10.5  Text alignment in a Table 10.6  Rowspan and Colspan 10.7  Table Caption

This tag set the caption of the table.

<caption align=top>Caption</caption>

Example :
 
<html>
 <head>
 <title>Advance Table Tags</title>
 <body bgcolor=FFDDEE>
 <table border=5 cellspacing=0 cellspadding=2 bgcolor=blue width=70% height=90%>
 <caption align=top><h2>This is a colourful table</h2></caption>
 <tr bgcolor=cyan bordercolor=green >
 <td></td> 
 <td align=center valign=middle>Monday</td>
 <td align=right valign=middle>Tuesday</td>
 <td align=center valign=middle>Wednesday</td>
 <td align=right valign=middle>Thursday</td>

 </tr>
  <tr>
 <td rowspan=3 bgcolor=pink>Subject</td>
 <td bgcolor=CC33FF>Management</td>
 </tr>
 <tr>
 <td bgcolor=CC88BB>Finance</td>
 <td bgcolor=BBFFEE>Business Law</td>
 </tr>
 <tr>
 <td colspan=2></td>
 <td bgcolor=9966CC>Economics</td>
 <td bgcolor=88FFAA>HRM</td>
 </tr>
 </table>
 </body>
 </html>
 

 

Copy the codes above and paste them into your norepad. Save as table2.html

Click here for the sample output. [Back to Main Page]