Home Advertise with us Forum Articles Sitemap Contact
Logo  

HTML Tables

Tables in HTML where primarily meant to present tabular data. However with the advancement in HTML, the tables are also being widely used for advanced layouts.

To create tables in HTML, the <table> tag is used. The table is divided into rows using <tr> tag & into columns or data cells using <td> tag. The data cell thus developed can contain anything from text, paragraph, images, forms, list & more. Tables are associated with the border attribute . In case of absence of a border attribute, the tables are displayed without any borders. Though this specification is not mandatory, it is most often preferable to specify the border attribute when creating tables in HTML. It is also possible to define headings for your tables. Headings for a table are defined using the <th> tag.
 
Example:

<table border="1">

<tr>
<th>Heading</th>
<th>Another Heading</th>
</tr>

<tr>
<td>row 1, cell 1</td>
<td>row 1, cell 2</td>
</tr>

<tr>
<td>row 2, cell 1</td>
<td>row 2, cell 2</td>
</tr>

</table>
 
 

HTML Tip 1

Use only hexadecimal #RGB values for colors. The behavior of named colors is browser-idiosyncratic and totally unpredictable.
 
 

HTML Tip 2

You can resize your images without a graphics program by changing the HEIGHT and WIDTH in your image tag.