A reader writes:
I have a Mac running OS 10.3.5, and I am trying to use TextEdit to write HTML code in your example. However, it will not let me save the file with an .html extension, as you specify needs to happen for the browsers to properly read it. And I tried it anyway using both .rtf and .txt extensions (the only options it will allow), and Explorer says “it doesn’t know how to handle the type of file you’ve selected.” Of course, I didn’t expect it to work, because your book said it wouldn’t. What can I do? And will I continue encountering problems as I go through your book since I’m working on a Mac, and the book is written from the perspective of PC users? Thanks
First off, the good news: I actually wrote the book on a Mac, not a PC. I used the PC for screenshots, but I used a Mac to develop the examples. Everything will work, and you’ll have no further hiccups.
I can assure you that you can save HTML files using TextEdit. The secret is to choose “Make Plain Text” from the Format menu before you try to save the file. Then, when you go to save it, specify “.html” as the filename suffix and choose “Don’t Append” when TextEdit helpfully asks if you want to add the .txt extension or not. Do those two steps (which you only have to do when it’s a brand new document, btw) and you’ll be fine.
Or, look on a site like versiontracker for HTML editors: there are some nice choices that cost nothing at all, including WebCode, HTML Edit X and Taco HTML Editor. Or you can pop open your Terminal application and use a plain-text editor like vi to build your sites. That’s what I do, but, well, I might be a tad extreme in that regard. 🙂
🙂 THANK YOU SIR 😀 nice and simple 🙂 thumbs up 🙂
Workaround for the black screen when re-opening a xhtml file created in TextEdit: I added a capital “X” as the first character. Opens like a dream.
Formerly the document started with: <?xml…
Now it starts with: X<?xml…
With the “X,” the document won’t open in my browser, so to go live, make a copy, delete the “X” and save the change. For further edits, return to your original file (WITH the “X”).
Thanks! Exactly what I needed!
Thanks a lot, I just consider how can I make the plain text from Mac OS.
Thanks again!
it is very helpful. thank u very much. i was almost going to give up from macbook.
Um, Jim, you might find a visit to the “genius bar” at the local Apple Store to be a lot more “helpful” than venting your frustrations on an expensive piece of electronics. Good luck to you!
When text edit “helpfully asks” me to save the wrong extension, I’ll remember that it “helpfully” did so, and when I smash this MacBook “helpfully” with a hammer, I’ll remember how it “helpfully” contributed to the devaluation and destruction of society, and along with the internet and PCs, completely destroyed the world economy, “helpfully.”
Just wanted to say thank you! This was incredibly helpful! I was trying to figure out how to save my code so it would open in a web browser without any luck, so I decided to search online for some answers. This was the first page I stumbled upon and it was very helpful! 🙂 I was able to get it working beautifully! The only thing I would add to this, is that I am finding it helpful to save the file as an txt file before saving it as an html. This is because once saved as an html doc, textedit will only show a black screen when you try to open it back in that program to edit it and add things. But I’m going to keep playing around with it. Perhaps I’m missing something as simple as changing a setting so I can see the text! 🙂 Thanks!
hey so I followed the instructions but when I want to edit the html I can’t because the new .html files opens up as a web page on text edit. how the hell do I check my html on a browser then go back and make changes or add code.
thank you very much… it helped me a lot..
Thanks!! the information was very useful.I was thinking that my macbook was too complicated for me,(I am a pc user, recently bought a macbook)
thanks again!!
Very, very helpful. Sometimes it is frustrating to know enough to code HTML, but then not being able to get a simple Text app to work. Thank you very, very much.
Thank you Thank you Thank you!! I couldn’t understand how to save the simple text as html for the life of me, and it was driving me crazy! This was the only advice I could find on the web!
Thanks a bunch! I had some html coding saved in NotePad files on my PC, but I just moved to a Mac. I couldn’t open those files properly in TextEdit. Now I’m copying them from NotePad on my PC and emailing them to the Mac, and then saving them as html files in TextEdit. It’s a pain, but a solution! 🙂
Wow! FINALLY! I am so happy i found this site.
I brought my mac about a month ago now. And i’ve been trying to figure out how to do this for soo long lol.
brilliant help! Thanks alot 10/10
i just accidently erassed something very imported a homework how do i go back y just got my mac computer i really dont know how to use it