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 trial

HTML

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

Hi im stuck on this code challenge and i swear i got it right. i just put class="main-header" both with and without the peroid at the end of the sentence inside the header tag. if you could help me out that would be great.

heres a link https://teamtreehouse.com/library/css-basics-2/basic-selectors/id-and-class-selectors#

7 Answers

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,254 Points

It sounds like you've got all the bases covered. A class on the < header > element.

<header class="main-header"></header>

If you put those in for the first part of the challenge it should work. :-)

Hope this will help. :)

<header class="main-header">

But treehouse is this not wrong?

In the code that is already provided there is already a </header> in the HTML

Using the code provided above will give you the right answer, but will close the header too soon and not actually put the desired content into the header!?!?

<header class="main-header"></header>
  <span>Journey through the Sierra Nevada Mountains</span>
  <h1>Lake Tahoe, California</h1>
</header>

I am also stuck on this! I've watched the video about 3 times over. No luck. Has this been resolved?

Have you tried the answer above. It should work.

<header class="main-header"></header>

THANK YOUUUUUU!!!!!!!!!!!!!!!!!!

It sure has. the first angle bracket starts the sentence. We put header class, then an equal sign, then the quote, then main-header. then we close with the other angle bracket. It's done right after the word header and before the word span. make a line space and just put it in. That should keep your code clean.I hope this helps, even if the author's post is old.

weeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeel dooooooooooooooooooooooooooooooooneeee!

<header class="main-header"></header>

<div="main-heading">

.main-heading { font-size: 72px; }