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
A Simple Sample Page
Figure 2.1 shows the text you would type and save to create a simple HTML page. If you opened this file with a Web browser such as Netscape Navigator, you would see the page in Figure 2.2.
Figure 2.1 Every Web page you create must include the <html>, <head>, <title>, and <body> tags.
Figure 2.2 When you view the Web page in Figure 2.1 with a Web browser, only the actual title and body text are displayed.
In Figure 2.1, as in every HTML page, the words starting with < and ending with > are actually coded commands. These coded commands are called HTML tags because they "tag" pieces of text and tell the Web browser what kind of text it is. This allows the Web browser to display the text appropriately.
An HTML tag is a coded command used to indicate how part of a Web page should be displayed.
Before you learn what the HTML tags in Figure 2.1 mean, you might want to see exactly how I went about creating and viewing the document itself:
- Type all the text in Figure 1.1, including the HTML tags, in Windows Notepad (or Macintosh SimpleText).
- Select File, Save As and be sure to select Text Documents as the file type.
- Name the file myfirst.html . (If you're using a Windows 3.1 or DOS program, you need to name it myfirst.htm instead because those old operating systems are too prudish to handle filenames ending in four-letter words.)
- Choose the directory folder on your hard drive where you would like to keep your Web pages—and remember which one you choose! Click the Save or OK button to save the file.
- Now start up Netscape Navigator or Microsoft Internet Explorer. (Leave Notepad running, too. That way you can easily switch back and forth between viewing and editing your page.)
-
In Microsoft Internet Explorer 5, select File, Open and click Browse. If you're using Netscape Navigator 4 or 5, select File, Open Page and click the Choose File button. Navigate to the appropriate folder and select the myfirst.html file.
Voilá! You should see the page in Figure 2.2.
Tags Every HTML Page Must Have | Next Section

Account Sign In
View your cart