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 How to Make a Website HTML First Use HTML Elements

Alex Cleanthous
Alex Cleanthous
1,658 Points

add a header element

I cannot answer a challenge question correctly.

Where do I put a header element?

I've tried in and outside the body element, and I am still not correct.

index.html
<!DOCTYPE html>
<html>
<head>
   <meta charset="UTF-8"> 
<title>

  <title>
</head>

  <body>
  <header>

    </header>
    <section>



      </section>
    <footer>
  </footer>

  </body>

</html>

4 Answers

Check out the Mozilla Developer's Network page on Content categories.

https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Content_categories#Sectioning_content

If I understand it right, the header element is used as a header within the section element. The

section element being used for creating a new section of content within the HTML.

I hope this helps

Jeremy Franklin

Tom Geraghty
Tom Geraghty
24,174 Points

Jeremy is right. The header tag should be the first thing in the section tag. That designates the content within the header tag as the header/heading/top of the particular section. It's a way of organizing information into a logical structure.

<section>
  <header>
  </header>
</section>

Hope this helps!

Hi there,

If they're asking for an <h1> element, that would be contained within the <body> section of the html code. Not sure if this helps or what the challenge question was.

James Hall-Treworgy
James Hall-Treworgy
3,326 Points

Hello :)

All you need to do is close you "</title >" tag like so.