Html – Effective method to hide email from spam bots


On my homepage, I'm using this method to hide my email from spam bots:

<a href="admin [at]"
   onclick="this.href='mailto:' + 'admin' + '@' + ''">Contact me</a>

What do you think about it? Is it effective? What other methods do you know or use?

Best Solution

Working with content and attr in CSS:

.cryptedmail:after {
  content: attr(data-name) "@" attr(data-domain) "." attr(data-tld); 
<a href="#" class="cryptedmail"
   onclick="window.location.href = 'mailto:' + + '@' + this.dataset.domain + '.' + this.dataset.tld; return false;"></a>

When javascript is disabled, just the click event will not work, email is still displayed.

Another interesting approach (at least without a click event) would be to make use of the right-to-left mark to override the writing direction. more about this:

Related Question