HTML, XHTML and CSS All-In-One for Dummies - Andy Harris [15]
Displaying file extensions
The method discussed in this section is mainly for Windows users, but it’s a big one. Windows uses the extension (the part of the filename after the period) to determine what type of file you’re dealing with. This is very important in Web development. The files you create are simple text files, but if you store them with the ordinary .txt extension, your browser can’t read them properly. What’s worse, the default Windows setting hides these extensions from you, so you have only the icons to tell you what type of file you’re dealing with, which causes all kinds of problems. I recommend you have Windows explicitly describe your file extensions. Here’s how to set that up:
1. Open the file manager (My Computer in XP or Computer in Vista and Windows 7).
Use the My Computer window to open a directory on your hard drive. It doesn’t matter which directory you’re looking at. You just need the tool open.
2. Choose Tools⇒Folder Options.
The Folder Options dialog box appears.
3. Select the View tab.
You see the Folder Options dialog box.
4. Don’t hide extensions.
By default, Windows likes to hide the extensions for known file types. However, you’re a programmer now, so you deserve to see these things. Uncheck the Hide Extensions for Known File Types box, as shown in Figure 1-2.
5. Show the path and hidden folders.
I like to see my hidden files and folders (after all, they’re mine, right?) and I like to list the full path. Click the appropriate check boxes to enable these features. You’ll often find them to be helpful.
6. Apply these change to all the folders on your computer by clicking the Apply to All Folders button.
This causes the file extensions to appear everywhere, including the Desktop.
Figure 1-2: Don’t hide file extensions (deselect that last check box).
Although my demonstration uses Windows XP, the technique is the same in Windows Vista and Windows 7.
Setting up your software
You’ll write a lot of Web pages, so it makes sense to set up your system to make that process as easy as possible. I talk a lot more about some software you should use in Chapter 3 of this minibook, but for now, here are a couple of easy suggestions:
♦ Put a Notepad icon on your Desktop. You’ll edit a lot of text files, so it’s helpful to have an icon for Notepad (or whatever other text editor you use) available directly on the Desktop. That way, you can quickly edit any Web page by dragging it to the Desktop. When you use more sophisticated editors than Notepad, you’ll want links to them, too.
♦ Get another Web browser. You may just love your Web browser, and that’s fine, but you can’t assume that everybody likes the same browser you do. You need to know how other browsers will interpret your code. Firefox is an incredibly powerful browser, and it’s completely free. If you don’t have them already, I suggest having links to at least two browsers directly on your Desktop.
Understanding the magic
Most of the problems people have with the Web are from misunderstandings about how this medium really works. Most people are comfortable with word processors, and we know how to make a document look how we want. Modern applications use WYSIWYG technology, promising that what you see is what you get. That’s a reasonable promise when it comes to print documents, but it doesn’t work that way on the Web.
How a Web page looks depends on a lot of things that you don’t control. The user may read your pages on a smaller or larger screen than you. She may use a different operating system than you. She may have a dialup connection or may turn off the graphics for speed. She may be blind and use screen-reader technology to navigate Web pages. She may be reading your page on a PDA or a cellphone. You can’t make a document that looks the same in all these situations.
A good compromise is to make a document that clearly indicates how the information fits together and makes suggestions about the visual design. The