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

Workspace malfunction why is the code challenge telling me my code is incorrect when it is?

I am on task 6 and it is asking me to add a header element, section element and footer element. However, when I have completed this task and checked my work, it says that a header element should be place between the <body> and </body> tags. Very confusing, since it is what I did.

index.html
<!Doctype html>
<html>
  <head>
    <meta charset="utf-8">
    <title></title>
  </head>
  <body>
    <h1>Nathan Gonzales| Developer</h1>
    <section>Gallery goes here.</section>
    <footer></footer>
  </body>
</html>

2 Answers

Rachel Bird
Rachel Bird
11,968 Points

I had to do it like this to get it to pass:

<!DOCTYPE HTML>
<html>
  <head><meta charset="utf-8">
  <title></title></head>
  <body>
    <header></header>
    <section></section>
    <footer></footer>
  </body>
</html>

Seemed like it mattered that the section and footer were inside the body too.

Thanks Rachel,

I get it now.

Dan Johnson
Dan Johnson
40,533 Points

It's looking for the actual header element instead of one of the heading tags.

Just switch from:

<h1>Nathan Gonzales| Developer</h1>

To:

<header>Nathan Gonzales| Developer</header>

Thanks Dan,

I was a little confused, but it seems like an easy fix.