You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What specific section or headline is this issue about?
The main discription of the class attribute
What information was incorrect, unhelpful, or incomplete?
I think that "space-separated list" is not a clear enough description of what the value can be. Can it include any non-space unicode character? There is a link to the specification, but it is necessary to follow a second link after that to find this information.
What did you expect to see?
The actual rules, plus some guidance on best practices.
For example:
A space-separated list of tokens, each consisting of any character other than a space. For maximum compatibility, it may be recommended to use only letters, numbers, dashes and underscores.
Do you have any supporting links, references, or citations?
#28752 is very related. Short answer is most characters are accepted but some make your life harder. Long answer should be put into the docs.
Josh-Cena
added
help wanted
If you know something about this topic, we would love your help!
and removed
needs triage
Triage needed by staff and/or partners. Automatically applied when an issue is opened.
labels
Jun 18, 2024
MDN URL
https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/class
What specific section or headline is this issue about?
The main discription of the class attribute
What information was incorrect, unhelpful, or incomplete?
I think that "space-separated list" is not a clear enough description of what the value can be. Can it include any non-space unicode character? There is a link to the specification, but it is necessary to follow a second link after that to find this information.
What did you expect to see?
The actual rules, plus some guidance on best practices.
For example:
A space-separated list of tokens, each consisting of any character other than a space. For maximum compatibility, it may be recommended to use only letters, numbers, dashes and underscores.
Do you have any supporting links, references, or citations?
Link in article to spec: https://html.spec.whatwg.org/multipage/dom.html#global-attributes:classes-2
Extra links found in the spec, when read together gives a more complete answer
https://html.spec.whatwg.org/multipage/common-microsyntaxes.html#set-of-space-separated-tokens
https://infra.spec.whatwg.org/#ascii-whitespace
Do you have anything more you want to share?
I encountered the class name "N/A" in the wild, and I came to MDN to find out if it is a valid class name.
MDN metadata
Page report details
en-us/web/html/global_attributes/class
The text was updated successfully, but these errors were encountered: