QUESTION IMAGE
Question
in css, how would you select only the list items with class name \important\? <ul> <li class=\important\>wash dishes</li> <li>finish crossword</li> <li class=\important\>feed chickens</li> </ul> choose 1 answer: a important { } b #important { } c .important { } d li { }
In CSS, a class selector is denoted by a dot (.). So to select elements with a specific class name "important", we use the dot followed by the class name. Option A just has the class name without the dot, option B uses a hash which is for ID selectors, and option D just selects all list - items without considering the class.
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
C. .important { }