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

John Conway
John Conway
2,868 Points

Error message "Bummer! A header element needs to appear between the <body> and </body> tags.".

I have an <h1></h1> set between body tags along with the <section<>/section> and <footer></footer> as asked in the previous questions. So what is wrong here?

index.html
<!DOCTYPE html>
<html>
  <head>
    <title></title> 
    <meta CHARSET="UTF-8">
  </head>
  <body>
    <h1></h1> 
    <section></section>
    <footer></footer>
 </body>
</html>

2 Answers

Roy Penrod
Roy Penrod
19,810 Points

You added an H1 element to the body instead of the header element they asked you for. They are too different tags.

Here's what the HTML should look like:

<!doctype html>
<html>
  <head>
    <meta charset="UTF-8">
    <title></title>
  </head>
  <body>
    <header></header>

    <section></section>

    <footer></footer>  
  </body>
</html>

Note: I checked the above code in the challenge and verified that it passed.

HI John, You are doing well and your code will still build a web page...except in this case you only need a <header> Tag because the challenge question requires it.