W3C home > Mailing lists > Public > www-html@w3.org > March 2007

Re: [html] Elements within "title"?

From: Steven Pemberton <steven.pemberton@cwi.nl>
Date: Fri, 09 Mar 2007 01:50:14 +0100
To: "Lachlan Hunt" <lachlan.hunt@lachy.id.au>, "Jens Meiert" <jens.meiert@erde3.com>
Cc: www-html@w3.org, help-whatwg.org@lists.whatwg.org
Message-ID: <op.towcl0zvsmjzpq@acer3010.parc.com>

On Tue, 27 Feb 2007 10:48:43 +0100, Lachlan Hunt  
<lachlan.hunt@lachy.id.au> wrote:
> Jens Meiert wrote:
>> I once again [1] need to ask why the "title" element must not contain  
>> other elements, although this might be quite desirable for certain  
>> elements (like "abbr", for example)?
> 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.

The title element gives metadata about the document. In XHTML2's unified  
treatment of metadata, the title element is considered as a shorthand for

	<meta property="title">Your title text here</meta>

But the meta element *can* contain other elements, so if you need to have  
a title with elements, then that is the place to put it:

	<meta property="title">
             <rb>石川 雅康</rb>
             <rt>ISHIKAWA Masayasu</rt>
           </ruby>: You are what you photograph

Best wishes,

Steven Pemberton
Received on Friday, 9 March 2007 00:50:22 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 30 April 2020 16:21:01 UTC