Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialDerek Goodwin
7,758 PointsGive 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
18,814 PointsWelcome 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!