This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 219 - '_' is not allowed in ids (underscores in identifiers)
Summary: '_' is not allowed in ids (underscores in identifiers)
Status: RESOLVED FIXED
Alias: None
Product: CSSValidator
Classification: Unclassified
Component: CSS 2.0 (show other bugs)
Version: CSS Validator
Hardware: Other other
: P2 major
Target Milestone: ---
Assignee: Philippe Le Hegaret
QA Contact:
URL:
Whiteboard:
Keywords:
: 155 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-06-03 09:04 UTC by Eugene Villar
Modified: 2004-11-26 11:11 UTC (History)
2 users (show)

See Also:


Attachments

Description Eugene Villar 2003-06-03 09:04:27 UTC
Similar to Bug 155. Both XML and HTML allow underscores in id atributes.

Line: 82 Context : #skip
Parse Error - #skip_nav {display: none;}
Comment 1 Sijtsche Smeman 2003-07-11 10:30:26 UTC
Bug does only exist in online version, not in the CVS version anymore. 
Considered as fixed
Comment 2 Etan Wexler 2004-11-25 16:00:05 UTC
*** Bug 155 has been marked as a duplicate of this bug. ***
Comment 3 Etan Wexler 2004-11-25 16:06:31 UTC
HTML specifications, free to read online, have never allowed the underscore in
ID values.
Comment 4 Eugene Villar 2004-11-26 11:08:15 UTC
According to HTML 4.01 specs, underscores are allowed:

ID and NAME tokens must begin with a letter ([A-Za-z]) and may be followed by 
any number of letters, digits ([0-9]), hyphens ("-"), underscores ("_"), colons 
(":"), and periods (".").
Comment 5 Eugene Villar 2004-11-26 11:11:35 UTC
Sorry, I forgot to include the relevant links to the specs:

http://www.w3.org/TR/REC-html40/struct/global.html#h-7.5.2
This shows that the id attribute is of type 'name' token.

http://www.w3.org/TR/REC-html40/types.html#type-name
This shows that name and id tokens can have underscores.