QUESTION IMAGE
Question
in css, how would you select only the paragraphs with class name \warning\? <p class=\warning\>dont do it.</p> <p>do it.</p> <p class=\warning\>nooo, dont do it.</p> choose 1 answer: a p { } b #warning { } c warning { } d .warning { }
In CSS, to select elements with a specific class name, we use a period (.) followed by the class name. Here we want to select paragraphs with class "warning", so we use the selector ".warning". Option A selects all paragraphs, option B selects an element with the ID "warning" (IDs are pre - ceded by a # in CSS), and option C is incorrect as it doesn't use the proper class - selection syntax.
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
D. .warning { }