Wednesday, 9 November 2011

Creating Email links

Creating Email Links on a web page

Example code for a Email link will be as follows

<a href="mailto:youremailaddress">Email Me</a>


Combine all the options and allow your visitor to send email with the address, subject and text already entered.

<a href="mailto:email@echoecho.com?subject=SweetWords
&body=Please send me a copy of your new program!">Email Me</a>

Set link Colours with CSS

If you want to specify the default colours which will be used in a web page you should use the following code. These colours will be applied to all links in the document.

<style type="text/css">
a:link {color: #000000; text-decoration: underline; }
a:active {color: #0000ff; text-decoration: underline; }
a:visited {color: #008000; text-decoration: underline; }
a:hover {color: #ff0000; text-decoration: none; }
</style>