Which of the following is a valid CSS selector to select all elements ?
2025
Which of the following is a valid CSS selector to select all elements ?
- A.
p { }
- B.
#p { }
- C.
.p { }
- D.
<p> { }
Attempted by 81 students.
Show answer & explanation
Correct answer: A
The valid CSS selector to select all elements is the universal selector (*). This selector matches any element in the document regardless of tag name. To verify, check if the selector targets all elements without restriction.