No student devices needed. Know more
15 questions
What does a class do?
adds color to words
adds style to specific elements
adds style to a whole page
adds a lot more work
Select the rule set to make all the text in your web page blue and centered.
p {
color: blue;
}
body {
text-align: left;
color: blue;
}
p {
text-align: center;
color: blue;
}
body {
text-align: center;
color: blue;
}
What is a class selector?
Selects any element within the HTML document that has a class attribute.
Allows you to select any element within the HTML document as long as it has an ID attribute
Allows you to select the descendant of elements within the document
Which is the correct (and most specific) CSS selector statement to change the text color of the first <li> element to red in the following example:
<ul>
<li class="redtext">Gravy</li>
<li>Turkey</li>
<li>Potato</li>
</ul>
.redtext { color: red; }
#redtext { color: red; }
li > redtext { color: red; }
Which is the correct (and most specific) CSS selector statement to select the text inside the HTML element and change the text color to red in the following example:
<div id="media">
Lorem Ipsum Dolores.
</div>
>media { color: red; }
.media { color: red; }
#media { color: red; }
You can apply multiple CSS IDs to the multiple elements.
True
False
What does the ID selector do?
Apply the style to a group of elements
Apply the style to all the elements
Apply the style to a specific element
Explore all questions with a free account