Challenge your knowledge of CSS selectors and styling properties in this interactive, no-login quiz!
Test your knowledge of CSS selectors and properties with this interactive quiz.
Configure your quiz using the options on the left, then click "Start Quiz" to begin.
| Selector | Description | Example |
|---|---|---|
.class |
Targets all elements with the class | .btn |
#id |
Targets a unique element | #header |
div > p |
Targets direct children | div > p |
a:hover |
Applies style when hovering a link | a:hover { color: red; } |
[type="text"] |
Attribute selector | input[type="text"] |
color, background-color - Text and background colorsmargin, padding - Spacing around and within elementsdisplay, position, z-index - Layout and positioningfont-size, text-align, line-height - Text formattingborder, border-radius, box-shadow - Element decorationflex, grid - Modern layout systems