debbie T Designs - Web Design Made Simple
Saving an xhtml File
Start With a Blank File
Please launch Notepad, TextEdit, or another similar basic text editor.
A blank file will open on your workspace. If you do not see a blank file, choose File>New to create a new file.
Note: If your editor creates a new file with its own bare-bones coding, select all and delete.
You can have several instances of Notepad open at once. They will launch in separate windows. That means you can work on several Web pages all at once, that is, if you get daring enough to do so!
Saving Your File
File>Save. Browse to the folder on your hard drive that you will be using to save your web files. I strongly suggest creating a new folder just for your web page files. If you are "too organized" like me, you also might want to create sub-folders for each web project.
Type "template.html" as your file name. Do not include the quotes – and do not use spaces or capital letters in your file name. Do not save your file as "template.txt" or "template.html.txt" – completely delete the .txt from the file name field before typing the new name.
Windows Notepad Users
HTML and XHTML documents must be saved in plain text formatting. So, underneath the file name, choose Save as type: Text Documents.
If you are using Windows XP, you might also see an option for Encoding. Choose ANSI.
Click the Save button, and your template has been saved.
See below for a screen shot.
Mac TextEdit Users
For Mac OS X users that are using TextEdit, the program must be set up differently for plain text. Launch TextEdit, choose TextEdit>Preferences and change these settings:
- New Document tab: change Format to "plain text".
- Open and Save tab: remove the check "append.txt extension to plain text files" so when saving your web files, you can add the .html extension.
- Place a check next to the "Ignore rich text commands in HTML files." This will keep your .html documents in code view. (Alternatively, when opening a file, select the "Ignore rich text commands" checkbox.)
To open an .html file in TextEdit, simply drag the file over the TextEdit icon on the Dock to open as a document, or launch TextEdit and choose File>Open.
Important File Saving Tips
For all around compatibility on the Web, it is important to follow these simple rules for saving any file that is meant for Web viewing. This includes the (X)HTML files along with any other files uploaded to your Web site.
- No capital letters in the file name. Use only lower case. Using uppercase letters are not necessarily harmful, but since web page file names are case sensitive, it makes it a lot easier if you use all lowercase.
- No spaces or special characters. In example: & , " #
- You may use a -dash or _underscore In example: my-file.html or my_file.html
Keep your blank "template.html" file handy as we delve deeper into XHTML.
I cannot seem to save my file properly using Notepad. It shows the .html extension in Windows Explorer, but it isn’t working.
ANSWER: Your file could be saved as a plain .txt in error. Check to make sure your file extensions are not hidden. Open Windows Explorer and choose Tools>Folder Options>View Tab>Files and Folders. Make sure the radio button for "Show hidden files and folders" is checked, and "Hide extensions for known file types" is UNchecked.