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 2

My html is not displaying correctly when opened in a browser. I have tried chrome, firefox, and safari.

I have checked my html, pasted below, and haven't found anything that is different than the simple instructions from the video. I have made sure to save it and when I open it in any browser it just displays exactly what you see below.

<!doctype html>

<html lang=“en”>
<head>
<meta charset=“utf-8”>
<title>My Page</title>
</head>
<body>
<div>this is a <span>div</span>.</div>
<span>this is a span</span>
</body>
</html>
Julian Gutierrez
Julian Gutierrez
19,201 Points

What did you name your file if you don't mind me asking?

3 Answers

Yea, the file is named index and its a .html file

Wang Lei
Wang Lei
2,766 Points

Actually I met the same problem on my Mac. It's OK on my Thinkpad. Very strange...

Hi Lawrence,

Well your code should display correctly. The only slight change that I'd make is to change !doctype to be !DOCTYPE. It's not really needed as it is not case sensitive, but it is the way that it is generally written.

If you look at the file in your file explorer, does it show the 'file type'/'Kind' as HTML ?

yes, it is a .html file. Still not displaying correctly