Re: [html] Elements within "title"?

On 28 Feb 2007, at 21:10, Paul Nelson (ATC) wrote:

> Let's consider real use cases. Where is the <title> element of the  
> HTML
> document rendered?

Here's a few. Often what is more constraining is how much horizontal  
space is available, and whether or not the line can wrap.

I am only considering a few usage cases here, but lets not forget  
HTML is used in many other places too.

Web browser UI:
Favourites toolbar (5-10 chars)
Tab bar tab (~15 chars)
Item in Window/contextual menus (try to keep under 30 chars)
Window titlebar, saved file names (can be 50 or so chars fairly  
comfortably)
Dialog boxes, server certificates, desktop clippings, etc. (can be  
any length and display most elements)

Search results web page:
Any length would do, and can display many elements.

> From my experience, the title is normally rendered in places that have
> very limited constraints. Does the <title> element really need to be
> styled?

We're not talking about so much about style (i.e. CSS-like behaviour)  
as structure.
In the cases I cited, language changes and science, yes it is  
important. Whether or not the limitations of one or more rendering  
platforms preclude them from displaying that structure is not HTML's  
problem, frankly.

> It would be great for people to give some scenarios based on where UAs
> might benefit from styling the <title>.

Anything that deals with chemical formulae, mathematics, minor planet  
designations, and a slew of other topics really need to use super and  
subscript to avoid much lengthier circumlocutions. You might have  
been able to get away with rendering it incorrectly [e.g. as "(C4NH3) 
n"] for a few years, but people demand more intelligence from their  
operating system and applications these days.

Perhaps an allowable subset of elements can be created, excluding  
<meta>, <table>, <a>, and others. <br> could be considered a hint for  
interfaces able to display the title on multiple lines, and  
interpreted as whitespace otherwise.

I hope this helps you.

- Nicholas.

Received on Wednesday, 28 February 2007 22:00:09 UTC