-
Notifications
You must be signed in to change notification settings - Fork 23.2k
ID value can start with a number #25200
Copy link
Copy link
Closed
Labels
Content:HTMLHypertext Markup Language docsHypertext Markup Language docseffort: smallThis task is a small effort.This task is a small effort.help wantedIf you know something about this topic, we would love your help!If you know something about this topic, we would love your help!
Description
MDN URL
https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id
What specific section or headline is this issue about?
#sect2
What information was incorrect, unhelpful, or incomplete?
This bold phrase: "should start with a letter" here:
Note: Technically, the value for an id attribute may contain any character, except whitespace characters. However, to avoid inadvertent errors, only ASCII letters, digits, '_', and '-' should be used and the value for an id attribute should start with a letter.
contradicts the HTML5 spec which says:
There are no other restrictions on what form an ID can take; in particular, IDs can consist of just digits, start with a digit, start with an underscore, consist of just punctuation, etc.
What did you expect to see?
The blue note agreeing with the HTML5 spec, i.e. stating that an ID could start with a letter.
Do you have any supporting links, references, or citations?
No response
Do you have anything more you want to share?
No response
MDN metadata
Page report details
- Folder:
en-us/web/html/global_attributes/id - MDN URL: https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/id
- GitHub URL: https://github.com/mdn/content/blob/main/files/en-us/web/html/global_attributes/id/index.md
- Last commit: ba96f2f
- Document last modified: 2023-02-24T05:52:35.000Z
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Content:HTMLHypertext Markup Language docsHypertext Markup Language docseffort: smallThis task is a small effort.This task is a small effort.help wantedIf you know something about this topic, we would love your help!If you know something about this topic, we would love your help!