HTML for tables

Introduction

The HTML written for tables should be inline with XTHML strict guidelines.

“The thead, tfoot and tbody elements enable you to group rows in a table. When you create a table, you might want to have a header row, some rows with data, and a row with totals at bottom. This division enables browsers to support scrolling of table bodies independently of the table header and footer. When long tables are printed, the table header and footer information may be repeated on each page that contains table data.

They should appear in this order: <thead>, <tfoot> and <tbody>, so that browsers can render the foot before receiving all the data. You must use these tags within the table element.” - W3School site

Code

<table summary="This table shows the data that is controlled in system three. Each column represents a specific type of data.">
<caption>Data controlled by system three</caption>
<thead>
<tr>
<th>Header 1</th>
<th>Header 2</th>
</tr>
</thead>

<tfoot>
<tr>
<td>Footer 1</td>
<td>Footer 1</td>
</tr>
</tfoot>

<tbody>
<tr>
<td>Data 1</td>
<td>Data 2</td>
</tr>
</tbody>
</table>

Leave a Reply

Further information

Date
Saturday 25th of October, 2008
Tags
,
Categories
Development

You can leave a response, or trackback from your own site.

You can follow any responses to this entry through the RSS 2.0 feed.

Categories

Hmmm…

If you have a question about something then feel free to email and I'll be more than happy to write a journal entry about it.

Send me an email