Does anyone know if the title tag has to be in the header of a page? My company is about to use a content management system that places the title tag within the body of the html. We're trying to determine if this affects search results.
Thanks
Marcia
11-11-2004, 12:10 PM
The title element absolutely has to go in the head of the document - definitely not in the body. Here are the official W3C HTML specifications for document structure:
W3C: The Global Structure of an HTML Document (http://www.w3.org/TR/REC-html40/struct/global.html)
It sure will affect search. Each element has to be where it's supposed to be, to be properly parsed - and the page title is the most important part of the page.
Maybe they're talking about a heading; that's a different story.
mcanerin
11-11-2004, 01:26 PM
For the record, I had a client who used several includes on his site by mistake and every include contained the default header information for the site, including title, meta information, etc. This resulted in multiple occurances of header information at the top, side, footer and in some cases, content area of the pages.
I discovered:
Browsers will render the title tag properly wherever you put the title tag. I've tested it in the following locations, both alone and all at once:
<title>My title test1</title>
<html>
<title>My title test2</title>
<head>
<title>My title test3</title>
</head>
<title>My title test4</title>
<body>
<title>My title test5</title>
Title Testing
</body>
<title>My title test6</title>
</html>
<title>My title test7</title>
IE, Firefox and Netscape 4.8 all just show the first title tag they come across, no matter where it is on the page.
The search engines, however, tended to show very odd results, not just for the title, but also for the meta tags. Sometimes it was the first occurance, and sometimes the last.
The good news is you won't *break* it. The bad news is that it's considered bad coding and the results are iffy at best, especially for search engines. I strongly recommend that you suggest to your developers that they follow standard and authorized HTML coding proceedure - or get new software that can.
It's not like it's hard - almost every other package on the planet does. Never accept bad code (and bad search results) just because someone is too lazy or does not have the skills necessary to code properly. And I sure would not *pay* for it. Honestly.
It truly puts into question the coding skill level (and thoroughness of testing)used for the rest of the package. If something this simple is out of wack, what else is going on behind the scenes? Do you really want to find out? At your expense?
I would have them fix it or use a new package. Personal opinion, but that's what I would recommend to a client.
Ian