Tables 1

  BACK   Home NEXT | Tables 2 

Table of Contents

Forms Of Tables Empty Cells Resizing Forms Of Borders Bordercolor Table Headers


Forms of Tables

General

All Tables must have the following basic form :

<table> 
<tr> 
<td> Text  </td> 
</tr>
</table>

Note :

One row / One cell
One rowTwo cells

Two rows / Two cells
 
Two rows Four cells
   
Empty Cells

&   A Cell must have an object to be visible. In case of Text is unavailable, use ( &nbsp; ).

A Cell with &nbsp;A Cell without &nbsp;
<table width="50%"border="1">
<tr>
<td> &nbsp; </td>
</tr> </table>

 

<table width="50%"border="1">
<tr>
<td>  </td>
</tr> </table>

Top

Resizing

&   Width and Height Values inside a <table> Tag stand for a proportion of the whole screen .

<table width="100%"border="1">

100% = the whole page ( screen )

If table width is 50% = of the whole page ( screen ),

The table will appear as :

50% = of the whole page ( screen )

&   Width and Height Values inside a <td> or <tr> Tag stand for a proportion of the whole Table .

Resize <TD>

<table width="80%"height="200%"border="1"> <tr>

<td width="20%">&nbsp; </td> <td width="60%">&nbsp; </td> <td width="20%">&nbsp; </td>

</tr> </table>

Click To See The Above Table

Resize <TR>

<table width="80%"height="100%"border="1">

<tr height="10%"><td>&nbsp; </td> <tr height="80%"><td>&nbsp; </td> <tr height="10%"><td>&nbsp; </td>

</tr> </table>

Click To See The Above Table

Forms of Borders

<table border="1">
<tr><td> </td>
</table>

The border will appear as :

 
 

<table border="3">
<tr><td>  </td>
</table>
The border will appear as :

 
 

<table border="6">
<tr><td> </td>
</table>
The border will appear as :

 
 

Top

Bordercolor

The Tag :

<table border="2"bordercolor="#ff0000">

The Result :

 

To have a border with various colors, Type the Tag :

<table border="10"bordercolordark="#000000"bordercolorlight="#ff0000">

The Result :

 
Top

Table Headers

< tr > = Table row< td > = Table data< th > = Table header

View a table of personal data

<table width="100%"height="25%">
<tr>
<th width=30%>Teachers'Names<th>Date of Birth<th>graduation Date<th>Date of Work
<tr height="20%">
<td>&nbsp;<td>&nbsp;<td>&nbsp;<td>&nbsp;
</table>

Teachers'NamesDate of Birthgraduation DateDate of Work
    

  BACK   Home   Top NEXT | Tables 2