Chapter 67. Creating Email Links


An email link isn't really a link, although it looks like one, and it uses the anchor tag. However, instead of directing the browser to another page or named anchor, it opens a blank email window. Use email links on your site as a way for your visitors to contact you.

GEEKSPEAK

An email link opens a blank email window when clicked.


An email link looks something like this:

 <a href="mailto:name@emailaddress">Send me email</a> 

The anchor tag creates the link, just as with a normal hyperlink, and it uses the href attribute, too, but the value of this attribute isn't a path. Instead, it's a special signifier called a mailto for obvious reasons. The text that follows the mailto is the recipient's email address. So, if you want the email to go to your personal email account, supply mailto in the href attribute followed by a colon (:) and your complete email address.

TIP

You can also supply a subject for the message and a carbon-copy (CC) address:

[View full width]

<a href="mailto :name@emailaddress?subject=Mail&cc=another@emailaddress">Send me email</a>

Subjects and CCs don't work with every email application, though, so don't be surprised if they don't work with yours.


If you're looking for an excuse to change the color of one hyperlink on your page without affecting the default colors (see Topic 62), an email link is a good candidate. Making this link a different color helps to set it off from the regular hyperlinks on the page, which reinforces the idea that the email link has a different function.

FAQ

I engage in acts of subversion. How can email links help me?

Nobody says that the email address in an email link has to be yours. If you're feeling especially naughty, you could create an incendiary Web page, add an email link, and direct the reams of hate mail that your page is likely to generate to your least favorite political organization. But you didn't hear that in this topic.




Web Design Garage
Web Design Garage
ISBN: 0131481991
EAN: 2147483647
Year: 2006
Pages: 202
Authors: Marc Campbell

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net