Forum Moderators: open

Message Too Old, No Replies

Title Tag not in <head>

         

pr0d

5:52 pm on Jun 6, 2005 (gmt 0)

10+ Year Member



We have a site using a CMS that will not allow us to put dynamic data in the title tag within the <head> tags. However, it is possible to add a custom tag called <title> within the <body> of our page. For example:

<html>
<head>
</head>
<body>
<title>Blue Widgets at WidgetPalace</title>
</body>
</html>

I know that it is necessary for the title to be inside the head for the page to validate. However, this would involve way too much custom work to implement with our current system.

Does anyone know if the search engine spiders will still index these pages using the Title outside the <head> tags? Would there be a dramatic difference in rankings?

Thanks,
pr0d

pageoneresults

6:58 pm on Jun 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Hello pr0d, Welcome to WebmasterWorld.

We have a site using a CMS that will not allow us to put dynamic data in the title tag within the <head> tags.

It may be time to research a new CMS or have the developers of the CMS address this issue pronto. The <title> element is one of the most important elements of a page.

However, it is possible to add a custom tag called <title> within the <body> of our page. For example:

This is not valid markup.

I know that it is necessary for the title to be inside the head for the page to validate. However, this would involve way too much custom work to implement with our current system.

Unfortunately you are going to have to bite the bullet and do the custom work so you can implement the <title> element where it is supposed to be, inside the <head></head> elements.

Does anyone know if the search engine spiders will still index these pages using the Title outside the <head> tags? Would there be a dramatic difference in rankings?

No they won't be able to index a page title if the page title is not within the <title> element which belongs inbetween the <head></head> elements.

pr0d

7:23 pm on Jun 6, 2005 (gmt 0)

10+ Year Member



Thanks for the response. That is pretty much what I was expecting to hear. I just did not know if the search engines were smart enough to work around this issue since Internet Exporer and Firefox both display the title tag even when the title is outside the <head>.

pageoneresults

7:39 pm on Jun 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Since Internet Exporer and Firefox both display the title tag even when the title is outside the <head>.

Hmmm, now you have me wondering. I have never ever seen the <title> element outside of the <head></head> elements. And, all of the documentation I've read from the authoritative resources, mainly the W3C state that the <title> element should be in the <head></head>.

pageoneresults

7:41 pm on Jun 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



7.4.2 The TITLE element [w3.org]

Every HTML document must have a TITLE element in the HEAD section.

The HEAD element contains information about the current document, such as its title, keywords that may be useful to search engines, and other data that is not considered document content. User agents do not generally render elements that appear in the HEAD as content. They may, however, make information in the HEAD available to users through other mechanisms.

encyclo

7:49 pm on Jun 6, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



How much editing control do you have over the header section? Can you remove the
<head>
,
</head>
and
<body>
tags completely (and the
</body>
tag as well from your footer)? As those tags are optional in HTML (not XHTML), you can "cheat" by letting the
</title>
tag implicitly close your HEAD section:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html lang="en">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<!-- end of your non-editable zone -->

[b]<title>Your title here</title>[/b]

<p>your content here...</p>

</html>

The above should validate fine.

petra

8:01 pm on Jun 6, 2005 (gmt 0)

10+ Year Member



I'm pretty sure which CMS you're refering to as I'm currently having the same problem with a cms I'm using for a new site and I'm in discussion with the developers about that same issue. I will sticky you with the CMS I'm refering to. :)

skyhawk133

3:43 pm on Jun 7, 2005 (gmt 0)

10+ Year Member



I've run in to similar problems and decided to do it a little opposite... rather than putting the title tag outside the head tag, I've put multiple head tags and browsers and search engines ignore the head tags after the first one:

<head>
<title>Title 3</title> *** This is what will show as the title in browsers and search engines
</head>

<head>
<title>Title 2</title> *** This is what the CMS Generates
</head>

<head>
<title>Title 1</title> *** This is the main title of the site
</head>

So, while it doesn't validate, every search engine indexes the pages properly and uses the first title tag and ignores the rest. So having more than 1 title tag doesn't seem to impact anything. They just load top down with the first title in the code being the one used.

pageoneresults

4:14 pm on Jun 7, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Wouldn't it be so much easier to correct things at the source rather than developing hacks that may or may not be valid markup and/or good practice?

Do you want to take the chance that maybe some spider will see all three <title> elements and raise a flag?

Dave_A

2:57 am on Jun 8, 2005 (gmt 0)

10+ Year Member



That was an interesting question..

So I just did a few mods to a website and then indexed it with my web spider.
Our search engine spider managed to understand it in one out of three goes.
So from my perspective it would be worth doing the extra work just to make sure that all is well because if it's missed at around 33% of the time it's not worth the risk..

Dave A