When creating the class attributes for HTML elements, what rules are there for the value?
Asked
Active
Viewed 783 times
0
-
1Search through the internet. Very basic. – Rajeev Ranjan Oct 02 '17 at 04:49
2 Answers
1
Naming rules:
- Must begin with a letter A-Z or a-z
- Can be followed by: letters (A-Za-z), digits (0-9), hyphens ("-"), and underscores ("_")
- In HTML, all values are case-insensitive

chickity china chinese chicken
- 7,709
- 2
- 20
- 49
-
-
@SafeerAhmed, yes you're right, the same rules apply to HTML id Attribute https://www.w3schools.com/TAGs/att_global_id.asp . "`id` - Specifies a unique id for the element. Naming rules: Must contain at least one character Must not contain any space characters In HTML, all values are case-insensitive" – chickity china chinese chicken Oct 02 '17 at 05:01