Html Table Tutorial

HTML Table is used web pages for listing items in a proper list or as a web template, like the header, container and footer..
Actually new web trends do not use tables much. As you may read "tableless templates".
But we will see how to use html tables in html document.


HTML Table Creation


Html table code basic example

<table>
<tr>
<td>This is my data cell</td>
</tr>
</table>
HTML Table Output
This is my data cell
Do not forget to close html table tags!

Html table code 2 columns 2 rows

<table>
<tr>
<td>This is 1. data cell</td>
<td>This is 2. data cell</td>
</tr>
<tr>
<td>This is 3. data cell</td>
<td>This is 4. data cell</td>
</tr>
</table>
HTML Table Output
This is 1. data cell This is 2. data cell
This is 3. data cell This is 4. data cell

HTML Table Headings

Headings are used to name the each column in table. Html table headings are created with <th> tag.

Html table headings example

<table>
<tr>
<th>My Heading</th>
</tr>
<tr>
<td>This is my data cell</td>
</tr>
</table>
HTML Table Output
My Heading
This is my data cell


Other HTML Table Tutorials