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 Text Emphasis, Strong, and Horizontal Rules

Webpage not loading properly

I've followed all of the instructions through the introduction and gone back to double check all of my work in my text edit file but for some reason when I open it in my browser it opens with all of the tags listed instead of just the paragraph text I entered. I'm not sure what I'm doing wrong.

Can you post the code you are using? Maybe we cn help if we actually see the code you have

<!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> <em>Beep Bop</em> Beep </p> <hr> <p> <strong>Beep Bop</strong> Beep </p> <p> Beep Bop </p> </body> </html>

Veerle Deschepper
Veerle Deschepper
2,623 Points

Can you post it again? surrounded with ``` (3 back ticks) like so:

3 backticks <code> 3 backticks

this way it won't cut the html code from your comment

<code>
Veerle Deschepper
Veerle Deschepper
2,623 Points

I cannot edit the above comment. but what I meant was

3 backticks

this is your code and I hope it does format right now!

3 backticks

<strong> This is your code and I hope it does format right now! sure a preview option would be handy but.. who needs that when you can edit your comment .... oh right >_>
</strong>

10 Answers

Veerle Deschepper
Veerle Deschepper
2,623 Points

When you make a new file in a text-editor it saves it as a .txt file (=plain text file) as a default. Can you check that your file has the correct .html extension?

It can be that the real file extension is hidden on your operation system, they tend to do that to make the file system less daunting for n00b users and avoiding naming mistakes So this means that the name you see is not really the file it is; bit hard to explain but I'll try :)

When those file extensions are hidden, it can look like the file is correctly named index.html but in fact it is named index.html.txt causing the behaviour your describing

I advice you to turn off the hiding thing:

win 7

win 8

osx

be careful: when you turn it off, you can change the file extension of a file easy; this can result in files without extension or files with the wrong extension. in either case the operation system will not know how to open the file! the file is not lost when that happens; but is better to avoid

I followed your instructions and revealed the document extensions. My text edit file is saved as a .html file but still not working with my web browser.

```<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>My Page</title> </head>

<body> <ol></ol> </body> </html>```

Veerle Deschepper
Veerle Deschepper
2,623 Points

think you have to leave a blank line below the 3 back ticks I'm afraid :( maybe take a look at the markdown cheat sheet? link is below this box. since it is an overlay I cannot link to it from here :(

(yes I am annoyed at this just like you are! the way this box works is ridiculous)

I figured it out! I ended up downloading text wrangler and using that instead of my text editor program that came with my mac. Everything is working great now, thanks so much for your help!

I figured it out! I ended up downloading text wrangler and using that instead of my text editor program that came with my mac. Everything is working great now, thanks so much for your help!

I figured it out! I ended up downloading text wrangler and using that instead of my text editor program that came with my mac. Everything is working great now, thanks so much for your help!

I figured it out! I ended up downloading text wrangler and using that instead of my text editor program that came with my mac. Everything is working great now, thanks so much for your help!

I figured it out! I ended up downloading text wrangler and using that instead of my text editor program that came with my mac. Everything is working great now, thanks so much for your help!

I figured it out! I ended up downloading text wrangler and using that instead of my text editor program that came with my mac. Everything is working great now, thanks so much for your help!

I figured it out! I ended up downloading text wrangler and using that instead of my text editor program that came with my mac. Everything is working great now, thanks so much for your help!

Veerle Deschepper
Veerle Deschepper
2,623 Points

oh! that is idd a no go, you cannot use textedit to write code. textedit is not basic enough for that it will always put its own markup on it. I recommend sublime but text wrangler is good to

just for educational purposes => this is what a "html" file looks like when saved as html with text-edit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta http-equiv="Content-Style-Type" content="text/css">
  <title></title>
  <meta name="Generator" content="Cocoa HTML Writer">
  <meta name="CocoaVersion" content="1265">
  <style type="text/css">
    p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
  </style>
</head>
<body>
<p class="p1">&lt;html&gt;</p>
<p class="p1">&lt;head&gt;</p>
<p class="p1">&lt;/head&gt;</p>
<p class="p1">&lt;body&gt;</p>
<p class="p1">Hello!</p>
<p class="p1">&lt;/body&gt;</p>
<p class="p1">&lt;/html&gt;</p>
</body>
</html>

I only typed this:

<html>
<head>
</head>
<body>
Hello!
</body>
</html>
Veerle Deschepper
Veerle Deschepper
2,623 Points

I cannot edit that again :((

so to clarify = textedit un-htmled my html and put his own html markup around it. so the browser saw html code but it was textedit's not your (since that was turned into text)