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 trialLawrence Lee
607 PointsMy 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
19,201 PointsWhat did you name your file if you don't mind me asking?
3 Answers
Lawrence Lee
607 PointsYea, the file is named index and its a .html file
Wang Lei
2,766 PointsActually I met the same problem on my Mac. It's OK on my Thinkpad. Very strange...
bothxp
16,510 PointsHi 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 ?
Lawrence Lee
607 Pointsyes, it is a .html file. Still not displaying correctly
Jason Anders
Treehouse Moderator 145,860 PointsJason Anders
Treehouse Moderator 145,860 PointsMOD NOTE: Edited markdown to display code.