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 HTML Introduction Global Structure: Part 1

Code in webpage

my code: <!doctype html>

<html lang=“en”> <head> <meta charset=“utf-8”>
</head>

</html>

renders in the web browser. Is this this normal for this to display in the browser? I''m using TextEdit....

No, <!DOCTYPE html> shouldn't be showing up. Did you use all caps?

12 Answers

Hi Charles,

Textedit is a word processor and that may be your problem. It might require you to set it up properly to handle text files. You may want to switch to a dedicated text editor like sublime text.

<!DOCTYPE html> should not be showing up. Does your code like like <!doctype html> or like <!DOCTYPE html>? Is <!DOCTYPE html> at the beginning or the end?

<!DOCTYPE html> is all lower case and appears at the beginning....

Try using uppercase. if that still doesn't work, send me your code

<!DOCTYPE html>

Code is still rendering in the page....here is my code: <!DOCTYPE html>

<html lang=“en”> <head> <meta charset=“utf-8”> <title>My Page</title>
</head> <body> <h1>This is a level 1 headline</h1>

 <p>Sample Text  
 </p>

p>Sample Text    
 </p>


p>Sample Text    
 </p>


</body>

</html>

Duplication Glitch

Note to self: Do not press the answer button seven times over and over again... :O

I wish Treehouse added a Delete answer because my answer duplicated like 10 times

Duplication Glitch

Duplication Glitch

Sorry, mega duplication glitch!!!

<!DOCTYPE html> is all caps....code still appears on the page...

Code renders as expected in CodePen. However, Safari, Chrome, IE and Firefox all display: <!DOCTYPE html>

<html lang=“en”> <head> <meta charset=“utf-8”> <title>My Page</title>
</head> <body> <h1>This is a level 1 headline</h1> <h2>This is a level 2 headline</h2> <h3>This is a level 3 headline</h3> <h4>This is a level 4 headline</h4> <h5>This is a level 5 headline</h5> <h6>This is a level 6 headline</h6>

<p>Sample Text   
</p>

p>Sample Text    
</p>


p>Sample Text    
</p>


</body>

</html>

TextMate works for proper rendering thanks guys.....

Charles Harpke you must type doctype in ALL CAPS like <!DOCTYPE html> You're page will be completely blank.