Saving HTML Files From the Web
on to a Mac
First prepare
to use Mac's text editor (which comes with OSX) called TextEdit:
Launch TextEdit. You should be able to find it using:
- With one finger, hold down the Command key (the key with the Apple icon and a curly 4-corner thing) on your keyboard.
- Continue to hold it down.
- Then tap quickly on the tab key.
- This will display icons of all of your opened applications.
- Keep tapping on the tab key until you select the Finder (the smiley square face).
- Release the keyboard keys.
- To the right of the Apple icon menu in the top left corner of your viewing area it ought to show the word Finder. If not, try the technique above again.
- You ought to see at least one Finder window. On the left there ought to be a column that lists these groups:
- FAVORITES - lists commonly used areas of your computer. (fyi, you can add to this list by simply dragging a folder over to it).
- SHARED - lists any things you have set up to share with.
- DEVICES (lists your Mac and its drives)
- If you do not see a Finder window, be sure that you see the word Finder next to the Apple icon menu in the upper left. Then press Command-N.
- In the FAVORITES section you ought to see the word Applications with an "A" icon. (Actually, it's a ruler, pencil, and paint brush arranged to look like an "A".)
- Click on Applications.
- Find TextEdit or TextEdit.app.
- Double click on it. This should start up TextEdit and open a new blank file.
Now you MUST modify TextEdit's preferences so that
it will save the file as a plain text document and not as an RTF file. Also, to allow you to add the .html file extension, which allows browsers to recognize the file. Note that the following is based on TextEdit v.1.8, which I got with OS 10.8.2 (Mountain Lion):
- In the TextEdit menu (to the right of the Apple
menu):
- TextEdit ->
- Preferences ->
- New Document section
- In the section: Format ->
- Enable Plain text
- In the section Open and Save ->
- Disable: Add ".txt" extension to plain text files
- Close Preferences.
View the source code (please see that document), and then copy it (please see that document):
- Command - A (to select all)
- Command - C (to copy all)
Return to TextEdit
- Command - V (to paste the code into TextEdit)
- Then select Save from TextEdit's File
menu.
- Save the file with the name as per the instructions of the exercises,
however, be sure to add the file extension .html
at the end.
- Then click on Save.
- The following message might appear:
"Document name <the name of your file> already seems to have
an extension. Append '.txt' anyway?" Select Don't Append.
Now test the html file by opening it in your browser. You may not have known that web pages can be on your computer's drive (not just on the web) and be opened in the same way that you would open a file in most other programs, which is as follows:
- Go to the browser's File menu.
- If you are using Chrome, or other browsers that do not have a menu bar, try Ctrl-O (Mac Cmd-O)which will usually open the File Open file browser.
- Select Open (in Safari it's Open File)
- Navigate to your file, open it, and see if it looks okay. It ought to look identical to the way the file looked when you saw it on the web.
The end (and none too soon!) |