CSS Class Selector
Multiple Choice Beginner
Question
How do you select an element with class "highlight" in CSS?
Hint
Class selectors start with a dot.
Explanation
The class selector uses a dot (.) prefix. .highlight selects all elements with class="highlight". You can also combine: p.highlight selects only <p> elements with that class. Multiple classes can be applied: class="highlight important".
Related Resources
Related Lessons
- CSS Selectors
Learn CSS selectors.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.