Re: 3.4. Global attributes

Some drive-by comments...

On Mon, 30 Jul 2007 14:31:06 +0200, Ben Boyle <>  
> 3.4.1. id attribute
> This section says the id must contain at least one character, but
> doesn't specify any limitations on that character. I thought it was
> invalid to have things like id="1" and id="$"
> I'm used to following the HTML 4.01 rules:
> - is HTML 5 different?
> What are valid id values?

Any character minus space characters. (Which follows from the definition  
given there.)

> 3.4.3. The lang (HTML only) and xml:lang (XML only) attributes
> Disappointed that this explicitly requires different attributes for
> each serialisation (but can't offer a solution).

I still think it makes some sense to allow lang= in both.

> 3.4.5. class attribute
> I tracked back through "unordered set of space-separated tokens" to
> discover that class names must be "words" but couldn't find the
> definition of what was a valid "word". Similar to 3.4.1. (id) I think
> there are possibly constraints around tokens? (This information may
> very well be in the spec, there just might need to be a link from
> these sections so it can be easily found.)

HTML5 does not have such restrictions.

> 3.4.6. irrelevant attribute
> Got a few tangential comments after reading this.
> Boolean attributes: in XHTML authors would use irrelevant="irrelevant"
> and in the DOM irrelevant = true; (I think some may mistakenly use
> irrelevant = 'irrelevant'; but that probably works anyway).

You can also use irrelevant="" which is slightly shorter and is equivalent  
to what <div irrelevant> would produce.

Anne van Kesteren

Received on Monday, 30 July 2007 12:40:38 UTC