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
- Using Named Anchors
- Linking to a Specific Part of Another Page
- Linking Your Email Address into a Web Page
- Summary
- Q&A
- Workshop
- 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
Linking Your Email Address into a Web Page
In addition to linking between pages and between parts of a single page, the <a> tag allows you to link to your email address. This is the simplest way to enable readers of your Web pages to "talk back" to you. Of course, you could just tell them your email address and trust them to type it into whatever email program they use if they want to say something to you. But you can make it almost completely effortless for them to send you messages by providing a clickable link to your email address.
An HTML link to my email address looks like the following:
<a href="mailto:dicko@netletter.com">Send me an email message.</a>
The words Send me an email message will appear just like any other <a> link (as underlined text in the color you set for links in the link or vlink attributes of the <body> tag). When someone clicks the link in most Web browsers, she gets a window in which to type a message that is immediately sent to you.
If you want people to see your actual email address (so they can make note of it or send a message using a different email program), type it both in the href attribute and as part of the message between the <a> and </a> tags.
For example, the HTML in Figure 7.7 is an email directory page for a club of aging German philosophers. (I know that Wittgenstein's English, but he was born in Austria, so they let him in the club anyway.) The resulting page in Figure 7.8 lists the club officers with a clickable email link for each.
Figure 7.7 Links to email addresses use the same <a> tag as links to Web pages.
Figure 7.8 The mailto: links in Figure 7.7 look just like http:// links on the page.
When someone clicks the top link in Figure 7.8, a separate window (see Figure 7.9) opens; the window has spaces for a subject line and email message. The email address from the link is automatically entered, and the user can simply click the mail button to send the message.
Figure 7.9 Clicking the top link in Figure 7.8 brings up this email window (or the email software set up on your computer).
Summary | Next Section

Account Sign In
View your cart