How to create an email link
To create an e-mail link on your page, all you need to do is use the standard link tag. The trick is in what you use as the address of the link. To force the browser to read it as an e-mail link, you use “mailto:” rather than “http://” to begin the address. After the “mailto:”, you will use your e-mail address rather than a web address, like this:
<A HREF=”mailto:your_email_address”>E-mail Me!</A>
Yes, all you need to do is replace the your_email_address with …..your e-mail address. Here is an example, to create an email link to myself, I would place firstname.lastname@example.org in that space, like this:
<A HREF=”mailto:email@example.com”>Give me some mail!</A>
Here is the resulting link:
If you click on the link, your browser will bring up a window for you to send me e-mail, with my e-mail address already filled in. Send me whatever you want- maybe your joke of the day or something!
You can also create the subject of the message so the viewer doesn’t have to fill in something in the subject line. You do this by adding a “?” at the end of your e-mail address and then your subject, like this:
<A HREF=”mailto:firstname.lastname@example.org?subject=Hey Scott”>Mail Me!</A>
The example link is below, notice that when you click it, the subject field of your email message is already filled in with “Hey Scott”.
Now, isn’t e-mail fun?
>> NEXT HTML Basics: The E-mail Link – More