To protect e-mails from spam robots I recommend using this technique, which will only reveal the e-mail adress for users with Javascript enabled, which is typically not the case of robots searching for e-mail adresses.
<script type="text/javascript">
jQuery(document).ready(function() {
$('a.mail').each(function() {
e = this.rel.replace('#/#','@'); // replace #/# by @
this.title = ''; // delete the title attribute
this.href = 'mailto:' + e; // add mailto and href instead of rel
$(this).html(e); // replace "Contact" by complete email address
});
})
</script>
Of course. you have to include the jQuery library in your <head> section to make this work.
Then you can write emails like this and they will be automatically replaced by Javascript :
<a href="#" class="mail" rel="example#/#example.com" title="Please enable Javascript to get the contact adress.">Contact</a>
You may use any suite of caracters for « #/# », except $ or +, just replace them in the script AND the markup.




