Re: [bug] name and id

* "Karl Dubost" <karl@w3.org> wrote:
| ****
| 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 (".").
| ****

| ****
| blabla
| <a href="#2000-cool">Be Strict To Be Cool!</a>
| blabla
| <a id="2000-cool">How to respect the standards</a>
| ****
|
| This document is not correct and it's detected by BBedit but not by
| the HTML validator.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<title></title>
<p><a id="2000-cool">How to respect the standards</a>

gives:

  Error: value of attribute "ID" invalid: "2" cannot start a name

The value of href is CDATA, the validator cannot complain about it. He could
if it were of type IDREF.
--
Björn Höhrmann ^ mailto:bjoern@hoehrmann.de ^ http://www.bjoernsworld.de
am Badedeich 7 ° Telefon: +49(0)4667/981ASK ° http://bjoern.hoehrmann.de
25899 Dagebüll # PGP Pub. KeyID: 0xA4357E78 # http://learn.to/quote [!]e
  "Everything we see or seem is but a dream within a dream" - E.A. Poe

Received on Wednesday, 13 December 2000 14:51:38 UTC