From 0f5f67332c8b0f98d800a83a595c4c328faebb85 Mon Sep 17 00:00:00 2001 From: wbamberg Date: Thu, 1 Aug 2024 16:18:54 -0700 Subject: [PATCH] Update files/en-us/web/html/global_attributes/class/index.md Co-authored-by: Joshua Chen --- files/en-us/web/html/global_attributes/class/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/files/en-us/web/html/global_attributes/class/index.md b/files/en-us/web/html/global_attributes/class/index.md index 598d60efe2e7c29..63e1fd05655d10e 100644 --- a/files/en-us/web/html/global_attributes/class/index.md +++ b/files/en-us/web/html/global_attributes/class/index.md @@ -23,7 +23,7 @@ The `class` attribute is a list of class values separated by [ACSII whitespace]( Each class value may contain any Unicode characters (except, of course, ASCII whitespace). However, when used in CSS selectors, either from JavaScript using APIs like {{domxref("Document.querySelector()")}} or in CSS stylesheets, class attribute values must be valid [CSS identifiers](/en-US/docs/Web/CSS/ident). This means that if a class attribute value is not a valid CSS identifier (for example, `my?class` or `1234`) then it must be escaped before being used in a selector, either using the {{domxref("CSS.escape_static", "CSS.escape()")}} method or [manually](/en-US/docs/Web/CSS/ident#escaping_characters). -For this reason, it's recommended that developers choose values for class attributes that are valid CSS identifiers. +For this reason, it's recommended that developers choose values for class attributes that are valid CSS identifiers that don't require escaping. ## Specifications