[whatwg] [WA1] Title Element Content Model

Ian Hickson ian at hixie.ch
Wed Feb 28 17:52:47 PST 2007


On Sat, 9 Apr 2005, Lachlan Hunt wrote:
>
> The current draft states [1]:
> 
> | In HTML (as opposed to XHTML), the title element must not contain
> | content other than text and entities; user agents must parse the
> | element so that entities are recognised and processed, but all other
> | markup is interpreted as literal text.
> 
> I think that should be changed to state:
> 
>   "... but, for backwards compatibility, all other markup (such as
>    elements and comments) should be interpreted as literal text."

This is all defined in the syntax section now:

   http://www.whatwg.org/specs/web-apps/current-work/#writing

...and the <title> element section doesn't have any of this stuff.


> I don't think intentionally broken behaviour should ever be a strict 
> requirement, only a strong recommendation for backwards compatibility.

I disagree. Given a ~97% non-compliance rate, interoperability depends 
almost exclusively on handling of broken content.


> Although, are there any valid reasons as to why this requirement must be 
> retained, even in standards compliant mode?  Would many sites break if 
> it were fixed in standards mode?

What would you consider "fixed"?


> | In XHTML, the title element must not contain any elements.
> 
> I disagree with this.  XHTML 2 has been updated to allow markup within 
> the title element and I think this XHTML should too.  Since we can 
> change the content models for XHTML, I see no reason not too.

Given your arguments in help at whatwg.org and your comments in #whatwg, I 
assume you have changed your mind. :-)

(The answer is that <title> must be usable in pure-text enviroments -- 
indeed, the whole point of <title> is pure text environments; for rich 
markup, use your page's <h1>.)

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the whatwg mailing list