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
Workshop
Quiz
- Write the HTML to make it possible for someone clicking the words "About the authors" at the top of the page to skip down to a list of credits at the bottom of the page.
- Suppose your company has three employees and you want to create a company directory page listing some information about each of them. Write the HTML for that page and the HTML to link to one of the employees from another page.
- If your email address is bon@soir.com, how would you make the text "goodnight greeting" into a link that people can click to compose and send you an email message?
Answers
-
Type this at the top of the page:
<a href="#credits">About the authors</a>
Type this at the beginning of the credits section:
<a name="credits"></a>
-
The company directory page would look like the following:
<html><head><title>company directory</title></head> <body><h1>Company Directory</h1> <a name="jones"><h2>Jane Jones</h2> Ms. Jones is our accountant… etc. <a name="smith"><h2>Sam Smith</h2> Mr. Smith is our salesman.. etc. <a name="bharwaniji"><h2>R.K. Satjiv Bharwahniji</h2> Mr. Bharwahniji is our president… etc. </body></html>
If the file were named directory.htm, a link to one employee's information from another page would look like the following:
<a href="directory.htm#bharwaniji">About our president</a>
-
Type the following on your Web page:
send me a <a href="mailto:bon@soir.com">goodnight greeting</a>!
Exercises
- When you link back to your home page from other pages, you might want to skip some of the introductory information at the top of the home page. Using a link to a named anchor just below that introductory information will avoid presenting it to people who have already read it, making your pages seem less repetitive. Also, if any pages on your site are longer than two screens of information when displayed in a Web browser, consider putting a link at the bottom of the page back up to the top.
- Look through your Web pages and consider whether there are any places in the text where you'd like to make it easy for people to respond to what you're saying. Include a link right there to your email address. You can never provide too many opportunities for people to contact you and tell you what they need or think about your products, especially if you're running a business.
Hour 8. Creating HTML Forms | Next Section

Account Sign In
View your cart