HTML Inserting Table

HTML Inserting Table

So for you learnt making row web pages from top to bottom.But HTML provides facilities to organise HTML elements into grids (i.e. cells or a table) on the web pages.This features may be utilised in making web pages very attractive and compact.

Basic Table Tags
The HTML code for a basic table structure is shown below:

<table border=1>
 <tr>
 <td> row1 col1 </td>
 <td> row1 col2 </td>
 <td> row1 col3 </td>
 </tr>
 <tr>
 <td> row2 col1 </td>
 <td> row2 col2 </td>
 <td> row2 col3 </td>
 </tr>
 <tr>
 <td> row3 col1 </td>
 <td> row3 col2 </td>
 <td> row3 col3 </td>
 </tr>
 </table>

The border=1 attribute of the <table> tag instructs the browser to draw a line around the table with a thickness of pixel.
Each row of the is defined by table row tags <tr>…</tr> and then cells of each row are defined by table data <td>…</td> tags, that may contain any type of HTML tag.
TABLE Tag
This tag is used to define a table in the web page.This is a container tag starting with <table> and ending with </table> and contains one or more TR container tags. Its main attributes are Border, Bordercolor, BGColor and Background.
Border Attribute::

<table border=2>
 -Bordercolor Attribute::
 <table border=2 bordercolor=red>
 -Bgcolor Attribute::
 <table border=2 bgcolor=red>
 -Background Attribute::
<table border=2 background="pic01.jpg">

tr tag
The Table Row or TR tag is used within TABLE container to define a row of the table.This is also a container tag starting with <tr> and ending with </tr>.It contains one or more TD container tags.This tag has no attribute.It is used only the start and end of a row in the table.
td tag
The Table Data or TD tag is used within a TR container to define a data cell of the table.This is also a container tag starting with <TD> and ending with </TD>.