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

whats a header element

i have it between the body element but it wont work ?

index.html
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>diegoflores | dragon killer</title>
  </head>
  <body>
    <h1></h1>
  </body>
</html>

3 Answers

Hi Valentino,

The header element is where the title of your site goes. It normally contains where the style.css is connected to, as well as other scripts for fonts and js. Though some of these jquery or javascript files are suggested to be put in the footer for best practices and better loading. If your working on a single html page on the header you can also do inline css and javasript to add style to the page or functionality. Best practice is to have a style.css and or scripts.js separate from the html.

Hope that helps!

The title appears on the tabs on top of the browser.

put something between the h1.

That is not a header tag. H1 tags are often used within header tag to highlight important information. Just wrap the h1 tag with a header tag.

Chris Higgins
Chris Higgins
6,813 Points
 <body>
    <header></header>
    <section></section>
    <footer></footer>
  </body>

They want these 3 elements added into the body portion of your page.