Which of the following selects all p tags with the class alert and makes them red?

Study for the CodeHS Web Design (Picasso) Test. Prepare with flashcards and interactive multiple choice questions, each question supported by hints and explanations. Ace your exam!

The selection of p tags with the class "alert" and changing their color to red is accurately achieved by the correct answer. When using CSS, the syntax for targeting specific HTML elements based on their classes requires the element type followed by a period and the class name. In this case, "p.alert" correctly identifies all paragraph tags (p) that are assigned the class "alert." The declaration "{ color: red; }" specifies that the text color of those selected elements should be red, which is exactly what the question asks for.

Other choices either incorrectly refer to a class that does not match what we are looking for or specify a different color than red, thus failing to meet the requirements of the question.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy