Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

in css, how would you select only the list items with class name \impor…

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 { }

Explanation:

Brief Explanations

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.

Answer:

C. .important { }