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
- A Simple Sample Page
- Tags Every HTML Page Must Have
- Paragraphs and Line Breaks
- Headings
- Peeking at Other People's Pages
- Summary
- Q&A
- Workshop
- 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
Tags Every HTML Page Must Have
The time has come for the secret language of HTML tags to be revealed to you. When you understand this language, you will have creative powers far beyond those of other humans. Don't tell the other humans, but it's really pretty easy.
Most HTML tags have two parts: an opening tag, which indicates where a piece of text begins, and a closing tag, which indicates where the piece of text ends. Closing tags start with a / (forward slash) just after the < symbol.
For example, the <body> tag in Figure 2.1 tells the Web browser where the actual body text of the page begins, and </body> indicates where it ends. Everything between the <body> and </body> tags will appear in the main display area of the Web browser window, as you can see in Figure 2.2.
Netscape Navigator displays any text between <title> and </title> at the very top of the Netscape window, as you can also see in Figure 2.2. (Some very old Web browsers display the title in its own special little box instead.) The title text is also used to identify the page on the Netscape Navigator Bookmarks menu or in the Microsoft Internet Explorer Favorites list.
You will use the <body> and <title> tags in every HTML page you create because every Web page needs a title and some body text. You will also use the other two tags shown in Figure 2.1, <html> and <head>. Putting <html> at the very beginning of a document simply indicates that this is a Web page. The </html> at the end indicates that the Web page is over.
Don't ask me to explain why you have to put <head> in front of the <title> tag and </head> after the </title> tag. You just do. (Hour 22, "Organizing and Managing a Web Site," reveals some other advanced header information that can go between <head> and </head> , but none of it is necessary for most Web pages.)
Paragraphs and Line Breaks | Next Section

Account Sign In
View your cart