Type Selector

You already know the type selector: you’ve been using it since the previous lesson. It is the name of an element, such as h1 or p, and it selects all elements of that type on the page:

li {
	color: purple;
}

This rule makes all list items (li) purple, however many there are. When you add another item to the list, it will be purple too, without any extra work.

Instructions

Create a rule for h2 elements that sets color: sienna. All three level-two headings will have the same color as the main heading.

Start programming for free

By signing up, you agree to the Terms of Service and Privacy Policy.

Or sign up with:

3/15