Click to See Complete Forum and Search --> : <head> vs <body>


Bill Crawley
December 9th, 2003, 04:45 AM
Hi All,

I was always under the impression that the <head> section was kept for things such as metadata. However, All my pages have a common <table> currently residing in the <body> section. I have been told that this should be placed in the <head> section. Although it seems to work, are there any subtle reasons why this should or shouldn't be done.

Satishpp
December 9th, 2003, 12:09 PM
Anything that you wish to display in the document area of your browser window should be within the <body> tag.

The <Head> tag is a container tag for other tags like <link> , <script> <title> etc. Display elements should not be put in the <head> tag

All my pages have a common <table> currently residing in the <body> section.

So what you have currently is correct.

Putting the table in the <head> section may work for a specific browser or version of a browser which is lenient to this, but will not work on other browsers.

Also keep in mind browsers for persons with disabilities like speach browsers etc, which may not consider stuff in the <head> section as document content....

Hope this helps

Satish