Page 53 - HTML5
P. 53
contain only the characters [a-zA-Z0-9] and ISO 10646 characters U+00A0 and higher,
plus the hyphen (-) and the underscore (_); they cannot start with a digit, two
hyphens, or a hyphen followed by a digit. (emphasis added)
In most cases you may be able to escape characters in contexts where they have restrictions or
special meaning.
W3C References
• 3.2.5.1 The id attribute
• 3.2.5.7 The class attribute
• 6.2 SGML basic types
Read Classes and IDs online: https://riptutorial.com/html/topic/586/classes-and-ids
https://riptutorial.com/ 37

