[whatwg] [WA1] Title Element Content Model

Lachlan Hunt lachlan.hunt at lachy.id.au
Fri Apr 8 20:42:04 PDT 2005


Hi,

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."

I don't think intentionally broken behaviour should ever be a strict 
requirement, only a strong recommendation for backwards compatibility. 
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?

| 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.

Here are some use cases I can think of:

<title><span xml:lang="pt-BR">Brasil Futebol</span>: Brazil - Football 
World Champions</title>

(Real example I found [2], though I added the language markup, and the 
primary language appeared to be "en").


<title>
Eric's Archived Thoughts: <em>Really</em> Undoing html.css
</title>

(Note: Was a real example from meyerweb, but the WP bug that initally 
allowed it seems to have been fixed.  This was also an example of why 
the requirement for HTML parsers to treat the element as plain text (at 
least in standards mode) is bad [2])


<title><abbr title="Hypertext Markup Language">HTML</abbr> Tutorial</title>

Although current visual browsers may not be able to show things like 
emphasis or abbr expansions (eg. tooltips) visually in the window's 
title bar (though, that would probably depend on the OS), non-visual UAs 
(eg. aural) may still be able to indicate emphsis, expand abbr, etc. 
(eg. when speaking it).0


[1] http://www.whatwg.org/specs/web-apps/current-work/#the-title
[2] http://www.the-football.com/brasil_2.html
[3] http://meyerweb.com/eric/thoughts/2004/09/15/when-blog-software-attacks/

-- 
Lachlan Hunt
http://lachy.id.au/
http://GetFirefox.com/     Rediscover the Web
http://GetThunderbird.com/ Reclaim your Inbox




More information about the whatwg mailing list