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
Sarah Allahverdi
222 PointsTextEditer for Mac
My html being saved by "TextEdit" on Mac will NOT show up in any browser correctly. It just shows the text I wrote.
6 Answers
Gunjeet Hattar
14,483 PointsHi Sarah,
You could use Sublime and other mentioned applications like Coda. But I use text edit too and it works fine for me. Could you paste the html code you have written, may be we could have a look if there is something in there that could be fixed? No you do not need any software update, whether or not a page is rendered with HTML 4 or 5 is decided by <Doctype> tag (the first line) in the HTML syntax.
Ok I might have got the fix :)
Go to Preferences , in the New Document tab make sure you select Plain text under Format also under Open and Save tab in When Opening a file section make sure you select the Display HTML files as HTML code... and yes deselect Add .txt... which I believe you have already done.
After you make the changes create a new file, write some basic html code and save it with the extension .html and then check. It will work
Hope this helps.
Gunjeet Hattar
14,483 PointsWell does it show the html tags too? Or any sort of error?
If you have not added any style tags to the html file you have written it will only show the text on your browser (text within the <body>Text</body> tag). Which means it is ok.
Maybe it is not getting saved as a html file? You can go to the Preferences for TextEdit. Click on the Open & Close tab on the top and deselect ** add ".txt" extension to plain text files **
May be this might help!
Sarah Allahverdi
222 PointsThanks Gun, I meant it is just shows the tags, it is not actually using html...I saved it as an html file. I just went into preferences though, and that was already deselected. The best I've gotten is to save it as a rtf and then manually change it to .html and it will make it a header, but has a bunch of nonsense on the top...I'm amazed and how simple this should be and isn't...is there another editor I can use?
Sarah Allahverdi
222 PointsOh, also...I just saw it is saving as Html4 and aren't we on 5? Do I need to do a software update or something...or is this irrelevant?
Adam Sackfield
Courses Plus Student 19,663 PointsYou can use whichever version of HTML you desire just use the correct DOCTYPE at the top. As for other editors I use Sublime Text. But not sure if its on Mac, I know Coda is meant to be good for Mac
Austin Klenk
4,399 PointsTry using sublime Text 3
Adam Sackfield
Courses Plus Student 19,663 PointsFair point. The trial on Sublime is unlimited though so you could download and once start getting paid then pay for a license.
Adam Sackfield
Courses Plus Student 19,663 PointsAdam Sackfield
Courses Plus Student 19,663 PointsWow if this is what you have to do to start (whether simple or not) I would never use Text Edit. Move to sublime and spend more time coding.
Gunjeet Hattar
14,483 PointsGunjeet Hattar
14,483 PointsWell I know its a lot of task than simply writing and displaying using sublime :) . But I guess when one is during the initial stages of learning spending 70$ for an applications that only saves you from making these minor changes is asking a lot. In built free software can always to the initial trick.
Roberto Grasso
5,752 PointsRoberto Grasso
5,752 PointsThat worked great. I just noticed that I couldn't apply those changes to an existing doc. I had to create a whole new doc to make those changes apply correctly.