W3C home > Mailing lists > Public > public-html@w3.org > January 2008

HTML5 draft: id attribute question

From: David Naylor <naylor83@gmail.com>
Date: Sat, 26 Jan 2008 12:23:07 +0100
Message-ID: <479B181B.2000305@gmail.com>
To: public-html@w3.org
I was reading through the current HTML 5 draft, and these two paragraphs 
about the ID attribute confuse me:

"The |id <http://www.w3.org/html/wg/html5/#id>| attribute represents its 
element's unique identifier. The value must be unique in the subtree 
within which the element finds itself and must contain at least one 
character. The value must not contain any space characters 
<http://www.w3.org/html/wg/html5/#space>.

If the value is not the empty string, user agents must associate the 
element with the given value (exactly, including any space characters) 
for the purposes of ID matching within the subtree the element finds 
itself (e.g. for selectors in CSS or for the |getElementById()| method 
in the DOM)."

So, are space characters allowed or not?

If this is the wrong place to post this kind of question I apologise for 
spamming.


David Naylor


Received on Saturday, 26 January 2008 16:49:08 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:29 UTC