61. Which CSS feature allows reusable values throughout a stylesheet?
- a) CSS Variables (Custom Properties)
- b) SASS variables
- c) CSS Constants
- d) CSS Mixins
:root { --main-color: #06c; } declares variables usable with var(--main-color).
Test your knowledge of CSS with these interactive multiple-choice questions.
61. Which CSS feature allows reusable values throughout a stylesheet?
:root { --main-color: #06c; } declares variables usable with var(--main-color).
62. Which CSS property applies blur effects to elements?
filter: blur(5px) creates Gaussian blur effects.
63. Which CSS property blends an element's colors with its background?
mix-blend-mode: multiply blends element content with what's behind it.
64. Which CSS property blends background images?
background-blend-mode: overlay blends multiple background layers.
65. Which CSS selector targets elements with a specific attribute?
[data-id="123"] selects elements with matching attributes.
66. Which CSS selector targets the first child of an element?
67. Which CSS selector targets every odd-numbered element?
:nth-child(odd) or 2n+1 selects odd items.
68. Which CSS selector targets elements that are being hovered?
:hover applies styles when the mouse is over an element.
69. Which CSS selector targets checked radio buttons/checkboxes?
input[type="checkbox"]:checked matches toggled inputs.
70. Which CSS selector targets empty elements?
:empty selects elements with no children (including text nodes).
71. Which CSS selector targets the placeholder text of inputs?
::placeholder styles the placeholder text (note double colon).
72. Which CSS selector targets the first line of a paragraph?
::first-line pseudo-element styles the first line of text.
73. Which CSS selector targets the first letter of an element?
::first-letter creates drop caps or styled initials.
74. Which CSS selector targets links that haven't been visited?
:link matches unvisited links (distinct from :visited).
75. Which CSS selector targets elements that don't match a condition?
:not(.hidden) selects elements without the .hidden class.
76. Which CSS selector targets elements based on language?
:lang(fr) matches elements with French language content.
77. Which CSS selector targets elements that are currently focused?
:focus matches elements receiving keyboard/pointer focus.
78. Which CSS selector targets invalid form inputs?
input:invalid matches inputs failing validation constraints.
79. Which CSS selector targets elements with no siblings?
:only-child matches elements without brothers/sisters.
80. Which CSS selector targets elements that are currently being clicked?
:active matches elements during mouse/keyboard activation.