You are here: Home » Creating Content » What the Heck is HTML TITLE element and why do I need one?

What the Heck is HTML TITLE element and why do I need one?

by Dave Doolin on September 28, 2009 · 14 comments

(Reading time: 10 – 16 minutes)

Title tags, title elements, title attributes: Do you understand the difference, and why the difference matters for your SEO results?

You’d think smart computer programmers could figure out a simpler way than using the same word 3 different ways. But they haven’t, and the underlying problem (metadata specification) is surprisingly messy.

It’s late Sunday evening, a little after 11 pm. I guess that’s not really late… didn’t leave the house until 11 last night. Had a nice cup of espresso about an hour ago, as much to kill the headache (don’t ask) as to perk me up. Mostly, I’m thinking about how to wrap up your next two articles on SEO. The information is all there, everything you need to know. Rendering it into digestible form is proving tedious.

iTunes is streaming from a Chillout/Ambient site, and I stop, cold.

Lezzi Baba “I love Music” is the current cut in the playlist.

I’ve never heard it before. It’s good. For me, beyond good. I’ve found nothing about the artist, the singer, any of it. I’ve only found it on Youtube, and I’ve been playing it over and over.

I won’t ask your opinion, such things are intensely personal, and I don’t want to know whether you like it or not. It moves me and that’s what matters.

In a recent comment, Jan Geronimo was moved to write:

I’m stumped with title tags and what to do about them. I use Thesis theme and there’s a box in my dashboard which asks me to supply a title tag. I always leave them blank because I don’t know what to make of it.

Are you stumped by title tags too?

Title tags are not that difficult to understand, provided you understand the definitions.

Wait… before we dig into the “what,” let me motivate you with the “why:”


Your <title> element is the single most important part of part of your web page…

…for search engine indexing. It’s so important you can almost forget about out all other “SEO” if you’re writing bulletproof articles to sit on the long tail.

If all you understand about SEO is the function of the title element, you’re ahead of most bloggers.

Now let’s take a look at what a “title tag” really is.

Commit the following to memory:

  • title element: The HTML title element occurs only once in an HTML document, and only as a child of the HTML head element. A title element looks like this: <title> element data here </title> or like this: <TITLE> element data here </TITLE>. For example,
    <title>My Document Title Goes Here</title>
  • title tag: The word “tag” refers to the actual sequence of characters that open and close the title element. For example, <title> is the required opening tag, and </title> is the required closing tag. The characters comprising the title element are then opening tag characters, title characters, closing tag characters.
  • title attribute: Many other HTML elements, such as <a> (anchor) and <img> (image) may have an optional title attribute. For example:
    <img src="foobar.png" title="Foo Bar strikes again." />.

As you can see, the word “title” in HTML is context-dependent, and yes, that’s a hassle. But that’s how it is.

Why is this <title> thing so confusing?

Much of the confusion occurs because people do not understand these definitions, or do not care to employ the definitions correctly. For example, in the Thesis theme, the word “tag” is overloaded to mean the character data (e.g., the title) enclosed between the opening and closing title tags. Here’s a screenshot:

Thesis title tag is slightly misnamed.

Thesis title tag is slightly misnamed.


See where it says “…contents of the <title> tag”? That should be “…contents of the <title> element.”

Now, right here, a large number of programmers would dismiss this point as nit-picking. The general spirit of programming is this: When you write the code, you get to call stuff whatever you want. This is not official policy anywhere, it’s just – by observation – how programmers act. The (polite) explanation being “If you don’t like it, don’t use it.”

However, redefinition creates context-dependency where none previously existed. I never noticed this context-dependency here myself, but I’ve been hacking HTML since 1994, so I just sort of “know” what people mean. Someone without my experience might well stumble over context… especially when a web search results in a number of different, possibly contradictory explanations.

Website In A Weekend uses Michael Torbert’s All In One SEO (AIOS) plugin, which Thesis politely defers to when AIOS is present. Here’s what AIOS looks like for this post:

All In One SEO title

All In One SEO title

I believe Thesis defers to Godley’s Headspace plugin data as well.

Note that the title element is not the same as the article title. There’s several reasons you may want these to be different, a discussion postponed to a later article on title elements and SEO.

Note also the character entity data in the title, which gives me the angle brackets for displaying HTML correctly. By W3C title element definition, you can use any valid HTML character entity you choose in your title element.

Did you get all that? Great! Because handling the title element for a post or a page is only part of the story. You still need to handle the title element for your web site as a whole. That is, the title element delivered when someone (or a search engine) lands on your front page. This isn’t hard, but let’s get more fundamentals mastered first. We’ll handle your front page with both Thesis and All In One SEO in a later post.

Digging deeper into the title element

First, let’s see what the canonical source for all things HTML, namely, the World Wide Web Consortium (W3C), has to say about the HTML title element:

The title of a document is specified by the TITLE element. The TITLE element should occur in the HEAD of the document.

There may only be one title in any document. It should identify the content of the document in a fairly wide context.

The title is not part of the text of the document, but is a property of the whole document. It may not contain anchors, paragraph marks, or highlighting. The title may be used to identify the node in a history list, to label the window displaying the node, etc. It is not normally displayed in the text of a document itself. Contrast titles with headings . The title should ideally be less than 64 characters in length. That is, many applications will display document titles in window titles, menus, etc where there is only limited room. Whilst there is no limit on the length of a title (as it may be automatically generated from other data), information providers are warned that it may be truncated if long.

>>>NOTE: Your article is NOT the “document” as explained above. Your article, blog post, page, etc. exists as content within the body element of the HTML document. Your article title exists within the “header” component of your article, the element title exists in the <head> element of the HTML document. Here’s more information on head vs. header if this point isn’t clear.

Here’s the source for the w3c HTML title definition web page:

4
5
6
7
<HEAD> 
  <TITLE>The TITLE element in HTML</TITLE> 
  <LINK rel="Stylesheet" href="GuideStyle.css"> 
</HEAD>

Personally I find both amusing and enlightening how little metadata the <head> element contains for this web page. Standard SEO practice is to stuff the <head> element with metadata to improve search engine results. The W3C rightly needs no “SEO optimization.”

If you’re not quite following me, take a look at the source code for any page on your blog. CTRL-U opens the source in most browsers. Now examine everything located in the <head> element, everything between <head> and </head>. Thats a bunch of stuff, right? Here’s part of what Holly Jahangiri’s Bing SEO article’s <head> element looks like:

Head element for Bing SEO article

Head element for Bing SEO article

There’s more, too much to show in a screenshot, which just proves the point.

That’s a lot of stuff compared to the W3C web page!

This is proof positive: in the long term, for high quality, canonical, “evergreen” content, SEO doesn’t matter all that much.

Either your web site rises as a result of your dominating your niche and developing an excellent, trustworthy reputation for delivering valuable content, or you quit blogging (for whatever reason) and your stuff goes away. W3C has been on the (World Wide) Web since years before Google even started, so the entire W3C web site would have been one of the first sites in Google’s index. And it’s been in the index ever since: trusted as an absolute authority, totally dominating the HTML standards niche.

In short, you can go a long way just making sure your <title> element is handled.

Many uses for <title> element

The <title> element is often displayed in browser tab:

Title element on Chrome tab

Title element on Chrome tab

The title element may also be used in the tooltip for tabs in the Google Chrome browser, as shown in the following screenshot. Note that the cursor position over the browser tab was not captured:

Tooltip using title element

Tooltip using title element

I’m still playing Lezzi Baba. There’s a melodic thread that reminds me very much of Pitch Black’s Bird Soul. I have a crush on the woman at 2:38 in the Bird Soul video: Get outta there girl, before you get hurt!

“I Love Music” is tying itself to Upful Groupvine. For no particular reason at all.

Back to work…

Blog post and web page titles are different

Let’s revisit the difference between the web page as an HTML document, and your article as a property of the web page. Here’s the deal:

  • Blog post and page titles are marked up using <h1> elements. The article title can be as long as you want.
  • Web pages are titled with <title> elements. W3C recommends the title element contain no more than 64 characters as many browsers and other web applications will truncate long titles. Digg, for example, truncates long titles.
Blog post title using h1 element

Blog post title using h1 element

The <title> element and WordPress SEO

As noted at the beginning, the <title> element is the single most important part of your document for SEO purposes. There’s a number of reasons, all of which require some in-depth discussion. Since this article is already very long, let’s agree to postpone SEO title discussion to a future article. Since you’re so agreeable to waiting, I’ll also include a link to my preferred SEO analysis tool. It’s free, it’s works on single web pages, and all the results are explained very well.

Ok, well, that’s enough for now. If you’ve enjoyed reading about title tags and the like, I’d be delighted for a tweet, stumble, digg, or whatever. Thanks!




Would you like more? Send me a letter...
"Hi Dave,
Website In A Weekend seems pretty cool. I'm serious about this WordPress and web stuff, and I'd like to keep up with it. My name is and my email address is . I'm comfortable with email newsletters. I know you will protect my privacy, and that I can unsubscribe at any time. "

{ 14 comments }

Extreme John September 28, 2009 at 2:27 pm

Hey dave first time stopping by your blog I wanted to say hello and see what you had going on here.

Wow you have a lot of excellent information going on here, wish I had found all of this Wordpress information about a year ago! Added you to my Feedly feed reader, hope you don’t mind me coming through from time to time.
Extreme John´s last blog ..Extreme John $250 Fan Sign Contest My ComLuv Profile

jan geronimo September 29, 2009 at 1:37 am

I can’t believe I’m actually chafing at the leash just to get hold of that second part of this series. You made it sound so exciting and easy! I’ve emailed some of my friends who’s struggling with the same issue. You can say that it will be more fun having others share the goodies you have. Thanks, Dave, for listening to problems your readers are struggling with and actually writing useful posts to address these needs. “,)
jan geronimo´s last blog ..Giving Good Loving To My Top Follow Friday People My ComLuv Profile

Dr Wordpress! September 29, 2009 at 11:05 am

@Extreme John – Yeah, there’s A LOT here. More than 100,000 words I’m sure, much of it contained in massive walls of text.

I’ll have more snackable content in the future.

@jan – Thanks! These articles are very time consuming to write. I see stuff on other blogs about “Write Your Ebook In 13 Hours” and I have to laugh. This article took probably 7-8 hours spread over several days. With respect to my formally published work, this would be considered an adequate (barely) first draft. But standards are different for web publishing.
Dr Wordpress!´s last blog ..Join A Mastermind Group For Personal And Professional Success My ComLuv Profile

jan geronimo October 11, 2009 at 10:31 am

You’ve mentioned All in One SEO here. I used to have it but I had it deactivated and deleted because Thesis has a built-in SEO goodness. Remember? I referred to these as little boxes? LOL.

Would it benefit my blog more with All in One SEO on top of this built-in SEO functionalities of Thesis?
jan geronimo´s last blog ..My Top #FollowFriday People and Their Best Posts My ComLuv Profile

Dr Wordpress! October 11, 2009 at 10:34 am

@jan, no, Thesis should handle what you need. Best bet is to check the source of your pages to see what it’s doing.

Actually, no, that’s not the best bet… the best bet is checking the WordPress and Thesis source code to see what it’s doing. That’s canonical.
Dr Wordpress!´s last blog ..What To Do When You Have Too Much To Do My ComLuv Profile

jan geronimo October 11, 2009 at 10:52 am

Okay, thanks for the info.

Off-topic:

Digg submission is puzzling. It doesn’t have category for weblogs. What do category do you use in your submission? Submitted this post, but I’m not happy with the category. I’ve been looking and looking and so I settled for – please don’t laugh now – design. My excuse is that it’s for designing a post with excellent SEO elements.

I observed some blog posts were submitted as upcoming news. Absurd. But then again that’s Digg.
jan geronimo´s last blog ..My Top #FollowFriday People and Their Best Posts My ComLuv Profile

Dr Wordpress! October 11, 2009 at 12:11 pm

@jan –

I’m not really a Digg expert either, and in the past I’ve mostly used it to protect my content. I had the really unpleasant experience of having one of my articles ripped off, then the ripped off copy posted on Digg! Everything except a link to another article on WIAW was stripped out! I was never able to get it taken down, the splog was hidden behind several layers of redirects, and the hosting company of the blog promoting the spam log refused to deal with because it wasn’t on their servers.

The ripped off stuff lived on one host… the blogs promoting ripoffs on another host. Ugly.
Dr Wordpress!´s last blog ..What To Do When You Have Too Much To Do My ComLuv Profile

elmot October 12, 2009 at 12:40 am

Jan, emailed your article to us, and yes, this is a very lengthy and full of juice post. Though I am still trying to digest many parts of this one, I really appreciate the part that you dedicated yourself on helping seo noobs out there (heym that includes yours truly) LOL!

I am not using any seo plugin though I tried to install the all in one seo pack, I deactivated it for it is quite incompatible with my blog. I don’t know why. All other features of my blog in my dashboard do not appear when seo pack is activated. That is something really puzzling to me.
elmot´s last blog ..Stop Tweeting Political Stuffs, Bro. Seriously. My ComLuv Profile

Dr Wordpress! October 12, 2009 at 8:55 pm

@elmot – When you figure out what the SEO plugin problem is, I’d love to have it as a WordPress Gotcha!
Dr Wordpress!´s last blog ..What To Do When You Have Too Much To Do My ComLuv Profile

elmot October 14, 2009 at 7:20 pm

Actually, I haven’t solved the issue up till now…this SEO plugin is going me nuts.

Oh, something popped up in my mind. Could it be possible that a webhosting restriction prevent the SEO Plugin from working out fine on my blog?

Dr Wordpress! October 14, 2009 at 8:32 pm

elmot, I would it’s practically impossible for it to be the web host.

Have you tried changing themes? Which theme are you using anyway?
Dr Wordpress!´s last blog ..Payload-Envelope-Transport (PET) model for peer-to-peer overlay networks My ComLuv Profile

elmot October 14, 2009 at 11:33 pm

I haven’t changed my theme yet since I started blogging three months ago.

I am using the Isotherm theme by BizzArctic.

So could that be the culprit?
elmot´s last blog ..Manny Villar and Gloria Macapagal-Arroyo’s Generosity My ComLuv Profile

Rob November 11, 2009 at 8:30 am

This is actually a really good writeup that explains a lot. I’ll send it over to a few friends that are trying to figure out this whole internet thing ;)
Rob´s last blog ..Find a Reliable Supplier of Pet Meds on the Internet My ComLuv Profile

Dr Wordpress! November 11, 2009 at 11:11 am

@Rob – Thanks. There is a lot of material on this web site, but if you don’t find what you need, let me know and I’ll see about writing something up.
Dr Wordpress!´s last blog ..My Eyeballs Are Bleeding – And How I Write Thousands of Words Every Week My ComLuv Profile

Comments on this entry are closed.

Previous post:

Next post: