Which characters are valid in CSS class names/selectors? What are characters/symbols are allowed within CSS class selectors? I know that the following characters are invalid, but what characters are valid? ~ ! @ $ % ^ & * ( ) + = , . / ' ; : " ? > < [ ] \ { } | ` # Answer: You can check directly at the CSS grammar. Basically1, a name must begin with an underscore (_), a hyphen (-), or a letter(a–z), followed by any number
undefined
Is there a CSS parent selector? How do select the <li> element that is a direct parent of the anchor element? In example my CSS would be something like this: li < a.active { property: value; } Obviously there are ways of doing this with JavaScript but that there is some sort of workaround that exists native to CSS Level 2. The menu that I am trying to style is being spewed out by a CMS so move the active element to the <li> tag ... (unless