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

michael wright
michael wright
235 Points

Create the HTML element that will serve as the document root. I am having trouble with this, can someone help please

i thought <html></html> was the answer but it keeps telling me it wrong, what am i missing?

index.html
<html>
  <h1>Micheal Wright</h1>
</html>

2 Answers

Angela Visnesky
Angela Visnesky
20,927 Points

Hi Michael! You are really close. You need to declare your doctype first, then the html tag.

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

I hope this helps!

michael wright
michael wright
235 Points

thank you very much, this does help

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,860 Points

Hi Michael,

Your HTML is correct. Even though the Tasks did not ask for an <h1> to be included, it would affect this part of the challenge, just be careful in the future as adding what is not asked for will more often than not result in a Bummer!

For your question, however, it's not that it's wrong... It seems, though that you deleted the HTML from the first task. The first task asks you to create the doctype, but I don't see that in the code snippet above? If I copy / paste your HTML into the challenge with the HTML from the first task, it passes.

Code challenge are progressive. Unless specifically instructed to do so, do not alter or delete pre-loaded code or code entered from a previous task.

If you restart the challenge and put the doctype back in, you will pass.

Keep Coding! :) :dizzy: