Tables :
Tables are defined by this tag < table> and the table is divided in to rows which is defined by this tag < tr> and each row have cells which is defined by the tag <td> and every cell can contain (text, images, lists, paragraphs, forms, horizontal rules, tables, etc.) .
Example:
<table border="1">
<tr>
<td> Cell number one</td>
<td>Cell number two</td>
</tr>
<tr>
<td>Cell one in the second row</td>
<td>Cell two in the second row</td>
</tr>
</table>
Now I will view some properties and its functions
To add border to the table: < TABLE border=1>
If you want to make a table without a border or make border =0 :< TABLE>
Headings in a Table :
To make heading use this tag <TH>
<TABLE border=1>
<TR>
<TH>title</TH><TH>Another title</TH>
</TR>
<TR>
<TD>Row1, cell1</TD><TD>Row1, cell2</TD>
</TR>
<TR>
<TD>Row2, cell1</TD><TD>Row2, cell2</TD>
</TR>
</TABLE>
Empty Cells in a Table :
In The Case you want to make an empty cell simply don't write any data in it
<table border="1">
<tr>
<td>row1, cell 1</td>
<td>row 1، cell 2</td>
</tr>
<tr>
<td>row 2، cell 1</td>
<td></td>
</tr>
</table>
In case you want to know that this is empty cell and differentiate between the codes but in the empty cell
<table border="1">
<tr>
<td>row1, cell 1</td>
<td>row 1، cell 2</td>
</tr>
<tr>
<td>row 2، cell 1</td>
<td> </td>
</tr>
</table>
To add pictures and colors to the table:
To make the background of the table a picture write this tag:
<table border="1" background="Picture path">
Example:
<table border="1" background="rose.gif">
<tr>
<td>row1, cell 1</td>
<td>row1, cell 2</td>
</tr>
<tr>
<td>row2, cell 1</td>
<td>row1, cell 2</td>
</tr>
</table>
To make the background of the table a color write the following tag:
<table border="1" bgcolor="red">
Example:
<table border="1" bgcolor="pink">
<tr>
<td>row1, cell 1</td>
<td>row1, cell 2</td>
</tr>
<tr>
<td>row2, cell 1</td>
<td>row1, cell 2</td>
</tr>
</table>
To make the background of a cell a color:
<td bgcolor="red">colored cell</td>
To make the background of a cell a picture :
<td background="image path">cell image</td>
Example
<table border="1">
<tr>
<td bgcolor="pink">row</td>
<td>first</td>
</tr>
<tr>
<td> row</td>
<td background="rose.gif">second</td>
</tr>
</table>
To change the alignment of the text inside the cell :
<td align="left">align left </th>
<td align="center">Center</th>
<td align="right">align right</th>