TextEdit of MAC is same as NotePad
of Windows. So if you want to write
a HTML file
of your website in MAC, TextEdit is the easiest and cheapest way to do so. There are some steps to write HTML code in MAC which are given below
|
Image 1: Opening TextEdit using Shortcut key |
Step 1: First of all open
TextEdit. You can do it from Launchpad or by using
shortcut keys. Just press
cmd+Space and type TextEdit. (
Image 1)
Step 2: Write your
HTML Code in it. Due to TextEdit is not
a HTML editor, so it cannot complete tags or give any validation error. So please be careful when you are writing
HTML in it.
|
Image 2: Changing text mode to "Make Plain Text" |
Step 3: After writing the HTML code in the TextEdit we need to change the text mode. For doing this either use shortcut keys (Shift+Cmd+T) or go to "Format" from the TextEdit menu bar and select "Make Plain Text". (Image 2)
|
Image 3: Saving the text file as html |
Step 4: Now you have to save this file as
.html. Go to
File of TextEdit menu and select
Save. You can save this file using shortcut keys (Cmd+S) also. Give it a name (here
Greetings.html) with file extension
.html, Then choose the folder where you want to save it.
(Image 3)
|
Image 4: Confirming the Text file as a HTML |
Step 5: A dialog box will come with a message saying that "
You have used the extension “.html” at the end of the name. The standard extension is “.txt”." Select
".html". (
Image 4)
|
Image 5: The HTML file in browser |
Now go to the folder where you have saved your
HTML file. Open this file with your browser then you can see your
HTML as
an website.
(Image 5)
|
Image 6: After Re-Opening the HTML in TextEdit |
Suppose you need to modify this
Greetings.html. Very simple, just open the file with TextEdit again. But after
few updates of
TextEdit you need change some settings of TextEdit to see the raw code of HTML in MAC.
Otherwise when you are going to open the html file it will look like the
Image 6.
For changing the setting we have to go to the Preferences (
Cmd+,) from the TextEdit menu bar (
Image 7A). Then select "
Open and Save" tab and check "
Display HTML files as HTML code instead of formatted text" option under
When Opening a file. (Image 7B)
|
Image 7(B): Changing the setting of the TextEdit for HTML |
|
Image 7(A): Opening Preferences for changing settings. |
Now close the current window and TextEdit. Then open the HTML file again and you will see the source code of the HTML file. You can change anything in the file now.
No comments:
Post a Comment