left-image

build-website-header
spacer-image
 

Web Page Layout Using Tables Part 2

Here we will expand on the earlier article of using tables to structure or layout web pages /websites. In particular on correct cell positioning for search engines.

Here I will use a single table sectioned with rows and columns. This is probably the most common web page/website structure.

Logo
Navigation Content
Bottom Navigation

However a better structure, and the one I use is:

Logo
Empty cell Content
Navigation
Bottom Navigation

 

In the structure above a single empty cell is inserted so as the content block is seen by the search engines before the navigation block. To see how this works see how search engines see your web pages.

The HTML/xhtml for the above table is shown below:

 

<table width="350" border="1" style="border-collapse: collapse" bordercolor="#111111" cellpadding="0" cellspacing="0">


<tr>
<td colspan="2" width="348" height="84">

Logo
</td>
</tr>


<tr>
<td width="103" height="69">
Empty cell</td>
<td width="244" height="211" rowspan="2">

Content

</td>
</tr>


<tr>
<td width="103" height="142">

Navigation

</td>
</tr>


<tr>
<td colspan="2" style="vertical-align: bottom" width="348" height="80">

Bottom Navigation
</td>
</tr>


</table>

The above is the typical html/xhtml you see on most websites. The thing to notice is the table control like width, border, height is all done using either table attributes or table cell attributes (green highlights).

This is ok if the table is only used once, however in this case the table will be used as the site template and all of the pages created will contain this table. So if we decide to change the table width or any other element then we will need to modify all of the web pages in the website.

A much better way is to use Cascading style sheets to control the table and the web page.

 

Related Articles and Resources:

[Home page]  [About us] [Privacy Policy] [Contact Me]

Web Page Layout Using Tables Part 2

spacer2-image