Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

CSS CSS Basics (2014) Basic Selectors ID and Class Selectors

Give the header element a class attribute. Then, set the class value to main-header.

Give the header element a class attribute. Then, set the class value to main-header.

1 Answer

rydavim
rydavim
18,780 Points

Welcome to Treehouse!

You want to add a class attribute to the header element.

<header>  <!-- This is the opening tag of the header element. You want to add the class to this. -->
  <span>Journey through the Sierra Nevada Mountains</span>
  <h1>Lake Tahoe, California</h1>
</header>

You add an attribute by using the name, and then a value.

// Here is an example of adding a class to an html element.
<h3 class="big_heading">Big Heading</h3>

Hopefully that gets you on the right track, but please let me know if you have more questions. Happy coding!