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 trialMegan Cassidy
1,308 PointsWeb page shows coding
I'm currently practicing my coding in TextEdit, and having trouble when attempting to open my .html file online. Everything that is on the document shows, instead of just the words designated to show. Assistance would be much appreciated.
12 Answers
Stephanie B
10,082 PointsI was just about to say that. I have the same problem when writing MySQL. I changed the file to plain text and it worked just fine. I just do shift-command-T whenever I need to convert instead of setting the default.
Chris Dziewa
17,781 PointsTextEdit as a default sets everything as a rich-text format. To change this, you have to go into your TextEdit preferences and change to use plain text as a default.
Stephanie B
10,082 PointsI'm sure I can help, but it would be most helpful if you posted your code. In some cases, it can be because you have a syntax error, such as an extra "<" or ">". Take a good look at your code. If you can't find the error, please paste the code here.
Stephanie B
10,082 PointsYour code is fine, and it shows up perfectly fine in my browser. With TextEdit, I presume you're on a Mac. What browser are you using? And how are you attempting to view the file? What steps are you following?
Megan Cassidy
1,308 PointsSafari, then I attempted to open it in Chrome. I have been opening the page through the browser, but it doesn't seem to like that very much, nor when I click on the document.
Stephanie B
10,082 PointsI opened it in Safari, Firefox and Chrome with no trouble at all. By default, it should open in your default browser, so no worries about having to change file associations. I've been writing HTML for 20 years, so I'm not a newbie, but wow, I think I'm actually stumped. I'll keep giving this some thought. Maybe someone who is thinking outside the box will chime in.
Stephanie B
10,082 PointsI also cut and pasted the code into Dreamweaver and it's fine.
Megan Cassidy
1,308 PointsThank you so much for trying! I'm currently exploring the preferences of TextEdit, trying to see if that has anything to do with preventing me from seeing it correctly.
Stephanie B
10,082 PointsAh, see, that's thinking outside the box. I don't use TextEdit to write code. Look at the dialogue box settings when you save it. Try cutting and pasting into a new document and saving it again. Make sure you save it as a text document. I believe that's an option.
Stephanie B
10,082 PointsActually you can save it as a .html document, so you should be fine there.
Megan Cassidy
1,308 PointsThank you both so much! That did the trick! (^_^)
Robert Bojor
Courses Plus Student 29,439 PointsWhy not trying to use something like SublimeText, which is free by the way, to edit html and php? It eliminates the need to Save As all the time or switching document types and it works like a charm on Mac - the only downside is that it will ask you to buy every 10 saves or so, just hit cancel and carry on.
Megan Cassidy
1,308 PointsMegan Cassidy
1,308 Points