Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

in css, how would you select only the paragraphs with class name \warni…

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

Explanation:

Brief Explanations

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.

Answer:

D. .warning { }