Sams Teach Yourself HTML 4 in 24 Hours
- Table of Contents
- Copyright
- About the Author
- Acknowledgments
- Tell Us What You Think!
- Put Your HTML Page Online Today
- I. Your First Web Page
- Hour 1. Understanding HTML and XML
- Hour 2. Create a Web Page Right Now
- Hour 3. Linking to Other Web Pages
- Hour 4. Publishing Your HTML Pages
- II. Web Page Text
- Hour 5. Text Alignment and Lists
- Hour 6. Text Formatting and Font Control
- Hour 7. Email Links and Links Within a Page
- Hour 8. Creating HTML Forms
- III. Web Page Graphics
- Hour 9. Creating Your Own Web Page Graphics
- Hour 10. Putting Graphics on a Web Page
- Hour 11. Custom Backgrounds and Colors
- Hour 12. Creating Animated Graphics
- IV. Web Page Design
- Hour 13. Page Design and Layout
- Hour 14. Graphical Links and Imagemaps
- Hour 15. Advanced Layout with Tables
- Hour 16. Using Style Sheets
- V. Dynamic Web Pages
- Hour 17. Embedding Multimedia in Web Pages
- Hour 18. Interactive Pages with Applets and ActiveX
- Hour 19. Web Page Scripting for Non-Programmers
- Hour 20. Setting Pages in Motion with Dynamic HTML
- VI. Building a Web Site
- Hour 21. Multipage Layout with Frames
- Hour 22. Organizing and Managing a Web Site
- Hour 23. Helping People Find Your Web Pages
- Hour 24. Planning for the Future of HTML
- VII. Appendixes
- A. Readers' Most Frequently Asked Questions
- B. HTML Learning Resources on the Internet
- C. Complete HTML 4 Quick Reference
- D. HTML Character Entities
Transferring Pages to a Web Server
When a Web server computer sends Web pages to people through the Internet, it uses an information exchange standard called Hypertext Transfer Protocol (HTTP). To upload a page to your Web site, however, you usually need software that uses an older communications standard called File Transfer Protocol (FTP).
File Transfer Protocol is the standard that your file transfer software must adhere to when sending files to a Web server. The server then sends those files out to anyone who asks for them using the Hypertext Transfer Protocol.
You'll need to get four important pieces of information from your Web hosting service company before you can put pages up on your Web site:
- Your account name (sometimes called a username or user ID). If the same company provides you with both Internet access and Web hosting, the account name for your Web site will probably be the same as your email account name.
- Your password. This may also be the same as your email password.
- The FTP address for your site. Note that this address may or may not be the same as the address people go to when they read your Web pages.
- The directory folder where your Web page files should be placed. You can sometimes place them in the root directory, but often you need to go into a subdirectory named www or public, or the same as your domain name.
Next, you need to decide which software you'll use to send your pages to the Web server and maintain your site. This hour covers four options:
- Netscape Navigator
- Microsoft Internet Explorer
- Microsoft FrontPage (or similar Web site management software)
- CuteFTP (or similar FTP software)
Which of these do I recommend? It depends on your situation. If you plan on developing a complex Web site, you will find that a program such as Microsoft FrontPage saves you a lot of time by helping manage changing links between pages and automatically keeping track of which pages have changed and need updating. However, for the beginning Web page author and anyone who only plans to have a modest site with a few personal or business pages, it's easier to learn and use a simple program such as CuteFTP. If you just want to get your first page online without bothering to set up any new software at all, you can get the job done with the Web browser you already have. Microsoft Internet Explorer 5 is a better choice than Netscape Navigator 4 in this regard because Navigator doesn't yet allow you to delete and rename files once you put them online. (Navigator 5 should have this capability once it's released, though.)
If you're still not sure after reading the preceding paragraph, you should probably skip ahead to the section called "Publishing Pages with CuteFTP." For most readers of this book, that's likely to be the best choice overall.
Publishing Pages with Netscape Navigator
Many people don't realize that the Netscape Navigator Web browser can also upload pages to a Web server. Follow these steps:
-
Enter the address of your Web directory in Netscape Navigator's Location box, as in the following example:
ftp://myname:mypassword@siteaddress.net/home/web/wherever/
Put your account name and password for accessing the site instead of myname and mypassword , the FTP address for your site instead of siteaddress.net , and the top-level directory where your Web pages reside instead of / home / web / wherever /
- Select File, Upload File, as shown in Figure 4.1. (If you are using Netscape Navigator version 2 or 3, you must drag the file into the Netscape window from Windows Explorer or another file management program because the Upload File menu choice is new in Navigator version 4.)
Figure 4.1 You can connect to your Web hosting service and publish your HTML pages using Netscape Navigator 4's Upload File feature.
- Choose the file you want to upload and click Open. Wait while the files are transferred.
- Test your page by clicking the HTML file you just uploaded in the FTP directory listing (in the Netscape window). You're on the Web!
Even though Netscape Navigator can send files to any Web server on the Internet, specialized FTP programs such as CuteFTP and WS_FTP offer much more control for managing your Web pages. For example, Navigator doesn't give you any way to delete an old Web page or change the name of a Web page on the server computer. For these reasons, you'll definitely want something more than Navigator to maintain your Web site.
Publishing Pages with Microsoft Internet Explorer
As you might guess from the name, Microsoft Internet Explorer was designed to work just like the Microsoft Explorer file manager that comes with Windows. When you enter an FTP address in the Address bar of Internet Explorer 5, you can cut, paste, delete, and rename any file or directory folder on the Web server just as if it were on your computer's own hard drive.
Follow these steps to upload a page you've created on your hard drive so that it will appear on your Internet Web site:
- Start Microsoft Internet Explorer. In the Address bar, enter the drive letter and folder name of the directory on your computer where the page you created is currently located (c:\webpages\ is an example), and press Enter. Note that going to the folder by selecting File, Open won't work—you have to type the folder name directly into the Address bar.
- Click once on the file you want to upload to your Web site to highlight it. As in any Windows program, you can select multiple files by holding down the Shift or Ctrl key as you click on the files. Be sure to include any graphics files (see Hour 10) that need to go with the HTML file.
- Select Edit, Copy (see Figure 4.2).
Figure 4.2 To upload a page using Microsoft Internet Explorer, first go to the file folder where the files are on your own computer and select Edit, Copy.
-
Now use the following format to enter your account name, password, and site address in the Address bar:
ftp://myname:mypassword@siteaddress.net/home/web/wherever/
Put your account name and password for accessing the site instead of myname and mypassword , the FTP address for your site instead of siteaddress.net , and the top-level directory where your Web pages go on the server instead of / home / web / wherever /. Then press Enter.
- Select Edit, Paste. The file will be transferred from your hard drive to the Web server (see Figure 4.3).
Figure 4.3 Microsoft Internet Explorer uses the familiar Windows Explorer interface to paste files into folders on a distant Web server computer.
To delete or rename a file or folder on the Web server, right-click it and select Delete or Rename, just as you would with local files in an Windows application.
Publishing Pages with Microsoft FrontPage
More sophisticated programs such as Microsoft FrontPage 2000 turn publishing your entire Web site into a one-step, automated process. Whether you've created one or one hundred pages, you can put them all online by selecting File, Publish Web (see Figure 4.4). The first time you do so, you are asked to specify the location to publish your Web to, which simply means to enter the FTP address your Web hosting service gave you (or the HTTP address, if the Web server has FrontPage extensions installed).
Figure 4.4 Microsoft FrontPage makes it easy to upload many pages at once—or to upload just those pages you made changes to.
You are then asked to enter your account name and password. FrontPage automatically uploads all pages that you've changed since your last update. Other software—including Macromedia DreamWeaver, NetObjects Fusion, and Adobe PageMill—also offers automated uploading and site management features.
Publishing Pages with CuteFTP
Figure 4.5 shows one of the most popular FTP programs—CuteFTP for Windows. You can download a free copy of CuteFTP (see the following "To Do" section) although CuteFTP does require a modest registration fee for business users. (See the documentation that comes with the program for details.)
Figure 4.5 CuteFTP is a powerful and user-friendly FTP program that individuals can use for free.
Similar programs are available for Macintosh computers (Fetch is a favorite), and FTP utilities come preinstalled on most UNIX computers. You can find these and other FTP programs at http://www.shareware.com.
No matter which FTP program you choose, transferring your Web pages to a Web server involves the following steps. (The steps are illustrated here with CuteFTP, but other FTP programs work similarly.)
- Before you can access the Web server, you must tell your FTP program its address, as well as your account name and password. In CuteFTP, select a category for your site in the FTP Site Manager window (Personal Web Sites in Figure 4.6), and click Add Site to access the Edit Host dialog box shown in Figure 4.7.
Figure 4.6 CuteFTP includes an intuitive FTP site manager although most Web page authors need only a single FTP site entry.
Figure 4.7 Clicking Add Site or Edit Site in Figure 4.3 brings up this dialog box.
- Here's how to fill in each of the items in Figure 4.7:
- Site Label is the name you'll use to refer to your own site. Nobody else will see this name, so enter whatever you want.
- Host Address is the FTP address of the Web server to which you need to send your Web pages. This usually (but not always) starts with ftp. Notice that it may or may not resemble the address that other people will use to view your Web pages. The ISP that runs your Web server will be able to tell you the correct address to enter here.
- The company that runs the Web server also issues User ID and Password. Be aware that CuteFTP (and most other FTP programs) remember your password automatically, which means that anyone who has physical access to your computer can modify your Web site.
- You should set the Login Type to Normal unless somebody important tells you otherwise. (The Anonymous setting is for downloading files from public FTP services that don't require user IDs or passwords.)
- Set the Transfer Type to Auto-Detect. (This automatically sends HTML and other text files using a slightly different protocol than images and other non-text files, to ensure complete compatibility with all types of computers.)
- The Host Type should also be set to Auto-Detect, unless you have trouble connecting. In that case, you need to find out what type of computer you're connecting to and pick the corresponding Host Type.
- For the Initial Remote Directory, fill in the name of the main directory folder on the Web server where your Web pages will be located. The people who run your Web server will tell you that directory's name. (In some cases, you don't need to enter anything here because the Web server computer will automatically put you in the directory when you connect to it.)
- You can leave Remote Directory Filter and Local Directory Filter both blank. (This is where you would enter wildcards such as *.htm* if you want to see files ending only in .htm or .html when you connect to this site. All other files, such as .gif and .jpg, would then be ignored.)
- For the Initial Local Directory, enter the drive and directory folder on your computer's hard drive where you keep your Web pages.
- Normally, you won't need to change any settings on the Advanced tab unless you experience problems with your connection. If that happens, have your ISP help you figure out the best settings.
-
When you click OK, you'll go back to the window shown in Figure 4.6. Make sure you are connected to the Internet; click Connect to establish a connection with the Web server computer.
Most server computers issue a short message to everyone who connects to them. Many FTP programs ignore this message, but CuteFTP presents it to you. It seldom says anything important, so just click OK.
-
Once you're connected to the server, you'll see two lists of files, as shown earlier in Figure 4.5. The left window pane lists the files on your computer, while the right pane lists the files on the server computer.
To transfer a Web page to the server, select the HTML file and any accompanying image files in the left window. (Remember that you can hold down the Ctrl key and click with the mouse to select multiple files in any Windows program.) Then select Commands, Upload (see Figure 4.8), or click the Upload button on the toolbar.
Figure 4.8 To send files to the server, select Commands, Upload in CuteFTP.
As you can see, the same menu contains commands that delete or rename files (either on your computer or on the server), as well as commands to make and change directory folders.
- You can immediately view the page you just put on the Web server by using Netscape Navigator or Microsoft Internet Explorer.
- When you're done sending and modifying files on the Web server, select FTP, Disconnect to close the connection.
The next time you need to upload some Web pages, you won't need to fill in all the information in step 2. You can just click Connect, select the pages you want to send, and click the Upload button.
Making a File Available for Downloading | Next Section

Account Sign In
View your cart