Monday, February 1, 2010

Tables in HTML

Tags

In HTML, tables are designed with help of following set of tags:
  • <table></table>
  • <tr></tr> - divides the table into rows
  • <td></> - divides each row into data cells


Example:
<table border="1">
<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>


Border Attribute
With the help of border attribute, you can specify the thickness of the border for the table.

Headings in a table

The table can contain headings in any place as you like. The headings are enclose between the <th> & </th> tags.


link

No comments:

Post a Comment