Launch the TextEdit application and choose TextEdit > Preferences from the main menu.
Under the New Document tab, choose Plain Text as the format.
If you work with Rich Text, then the text that you type will be interpreted as formatted text instead of HTML code.
Then, in the Open and Save tab, make sure that Ignore rich text commands in HTML files is CHECKED.
You want to ignore rich text commands in HTML files so that when you open an HTML file using TextEdit, you will be able to view and edit the HTML source code.
Once you've set those options, choose File > New to create a new document and start typing your HTML code.
*In the image below, the window on the left is a rich text document window. The one on the right is a plain text document window. You will notice that they are different.
To save your work as an HTML file, choose File > Save As and save your work with a .html extension.
If a message saying You have used the extension ".html" at the end of the name. The standard extension is ".txt" appears, click on the Use. html button.
And you're done.
No comments:
Post a Comment