Jens Oliver Meiert

HTML: Semantics of “title” Element Content

Post from February 26, 2007 (↻ June 12, 2021), filed under .

This post is outdated.

I already proposed this in October 2005 but see the need to bring it up again: It would be useful to allow other elements within the title of an HTML document. Why? You otherwise cannot mark abbreviations and other flow content elements, which means their meaning gets lost. For example, you cannot write

<title><abbr>HTML</abbr> document title</title>

(whose markup wouldn’t need to be rendered), but are required to use

<title>HTML document title</title>

Therefore, there’s no way to tell that “HTML” is an abbreviation here.

The set of elements we could allow within title’s limited. HTML probably benefits from enabling

I’ll suggest this again to the respective working groups, despite the original responses. And I’m looking forward to your thoughts.

Update (February 27, 2007)

Lachlan Hunt writes (via a W3C mailing list):

For compatibility reasons in HTML, title cannot contain elements because of the way it is parsed. It would be possible to do so in XHTML, but then that would be another incompatibility between the 2 languages and there is also limited usefulness in doing so anyway, since many of the use cases for title are plain text. e.g. the window’s title bar, bookmarks, search results, etc.

While enabling other elements within title means a compatibility issue, I currently do not believe that you cannot ignore them under certain circumstances, like in the title bar. [What am I missing?]

Tweet this? (If it changed your life, you delight me with a coffee.)

About Me

Jens Oliver Meiert, on April 29, 2020.

I’m Jens Oliver Meiert, and I’m an engineering manager and author. I’ve worked as a technical lead for Google, I’m close to the W3C and the WHATWG, and I write and review books for O’Reilly. Other than that, I love trying things, sometimes including philosophy, art, and adventure. Here on I share some of my views and experiences.

If you have questions or suggestions about what I write, please leave a comment (if available) or a message.

Comments (Closed)

  1. On February 28, 2007, 15:33 CET, Herbert Schiemann said:

    Since the title element is not part of the body I do not see much use in allowing other elements within the title element in HTML. Representational elements like em and strong are not needed in the title element, may-be semantical elements.
    On the other hand I cannot see a convincing reason why not to allow any “inline” elements in the title element in XHTML

  2. On March 1, 2007, 13:16 CET, Jens Oliver Meiert said:

    Well, there are several use cases, not only for abbreviations and stuff, but also to indicate changes in language. Thus, this limitation becomes even more interesting. It’s not just a spec inconsistency.

    By the way, please consider (and participate in) the ongoing discussion on the W3C www-html mailing list (February and March archives).

  3. On March 2, 2007, 14:33 CET, Robin Hodson said:

    Although (trivally), you things like
    <title lang="fr">J’ai eu un chat</title>
    So all is not completely lost.

    Search engines are quite good at picking up context, anyway.

    If you’re really worried about it, surely XHTML is the way to go, anyway?

Read More

Have a look at the most popular posts, possibly including:

Looking for a way to comment? Comments have been disabled, unfortunately.

Cover: The Web Development Glossary.

Perhaps my most comprehensive book: The Web Development Glossary (2020). With explanations and definitions for literally thousands of terms from Web Development and related fields, building on Wikipedia as well as the MDN Web Docs. Available at Apple Books, Kobo, Google Play Books, and Leanpub.

Stay up-to-date? Follow me by feed or on Twitter.

Found a mistake? Email me,

You are here: HomeArchive2007 → HTML: Semantics of “title” Element Content

Last update: June 12, 2021

Professional frontend developers produce valid HTML and CSS.