This is really annoying or maybe I am doing something wrong. I am new to Mac and I am trying to write html code in TextEdit application. But when I write my code and save teh file as main.html, and I try opening it from safari, it opens the html code and not the html render. Am I doing something wrong? If a text file is named soemthing.html, shouldn't safari treat it as a webpage and open the page instead of showing me the code?
The default type of document that TextEdit creates is a RichText format (.rtf) document. I think what's happening is that you're actually creating a RichText format document of HTML code.
What you'll probably want to do is to open the existing file in TextEdit and press Command-Shift-T to change from Rich Text to Plain text. Then save a copy of the file with an .html filename extension. Then open that saved copy in Safari and it should most likely work as you intended.
Now, by default, when you open the file back up in TextEdit, it will show the page to you as it would appear in a browser, rather than showing you the raw HTML code. To see the raw HTML code for a particular file, use the Open panel to open the file and click the checkbox to "Ignore rich text commands". If you would like TextEdit to always show you the raw HTML code (for example, you double-click on the HTML file in the Finder) rather than rendered HTML, open TextEdit preferences and click the checkbox for "Ignore rich text commands in HTML files" in the Open and Save tab.
Hope this helps....
P.S. Easiest way to quickly preview in Safari what you've just written in TextEdit is to drag the small "proxy" icon in the window titlebar onto an existing Safari window in the background. (The "proxy" icon is meant to represent the file as it is on disk; you'll note that it's dimmed when there are unsaved changes).
Dual 2.7GHz PowerPC G5 w/ 2.5 GB RAM; 17" MacBook Pro w/ 2 GB RAM - Mac OS X (10.4.6)
Forgive the intrusion, can't find a better place for this query but...
When I choose Save As for my txt files I see no option to save as Word Format, as described in TextEdit's Help. I just want to save simple text in a format that a PC can read using Note Pad! the option onlys appears when I use Rich Text format. Please help!
Tom
When I choose Save As for my txt files I see no
option to save as Word Format, as described in
TextEdit's Help. I just want to save simple text in a
format that a PC can read using Note Pad! the option
onlys appears when I use Rich Text format. Please
help!
Plain text can be read by all word processors -- there is no special format for Word. Word format (.doc) is by definition Rich Text.
If is just plain enough. As soon as you enter things like an "ö" or "é" there may be differences between different platforms. Likewise paragraph breaks don't work the same on PCs and Macs.
The safest and easiest way to transfer text between a Mac and a PC is usually to use rich text of some kind like rtf, doc or even html, isn't it?
The safest and easiest way to transfer text between a
Mac and a PC is usually to use rich text of some kind
like rtf, doc or even html, isn't it?
I suppose html would be safest, because every machine has a browser than can read it. I don't know myself what NotePad can handle, which was the concern of the person asking the question.