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

Cody Mark
Cody Mark
510 Points

How to create an HTML element that will serve as the document root?

I'm not quite sure what it's asking for me to do?

index.html
<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <title>Cody Mark | Designer</title>
  </head>
  <body>
    <header>
      <h1> Cody Mark</h1>
      <h2> Designer </h2>
    </header>

2 Answers

Chase Marchione
Chase Marchione
155,055 Points

Hi Cody,

Looks like you have some extra code in there. To get through step 2, all you need is a DOCTYPE tag that specifies that the document is an html file, and opening and closing html tags.

<!DOCTYPE html>
<html>
</html>

When you get to the task that asks you to include a body, you'll want to include a closing body tag along with your opening body tag, too:

</body>

Hope this helps!

Douglas Counts
Douglas Counts
10,126 Points

You are putting to many steps into the process. You simply need to create the html element itself for now. This will get you an accepted answer.

<!DOCTYPE html>
<html>
</html>

-good luck...