HTML Links – Part 2
This is a follow up from HTML Links – Part 1. In this post we are going to have a look how to use a picture/image as a link as well as E-Mail Links.
Using an image as a link.
<a href="http://ersmitgirl/wordpress.com/lastpage.html"><img border="0" alt="My Last Page"src="http://ermsitgirl/wordpress.com/2009/03/02/html-link-part-2/roll.gif" width="75" height="68"></a>
Note: The Image File can be any format, jpeg, bmp, tiff, etc.
With this example it will open the client’s default e-mail program, create a new message, add a recipient in the ‘To’, ‘cc’, ‘bcc’ fields and also a short message in the ‘message text box’ (body of the message).
<a href="mailto:email@example.comfirstname.lastname@example.orgemail@example.com&subject=Winter%20Expo&body=I%20will%20will%20attend%20the%20Expo!">Send Mail</a>
Note:Use %20 instead of spaces in the sucject line and body text so the text will be displayed correctly.
In the next post we have an indepth look at all the attributes of the <a> Anchor tag.