<script language="javascript"> <!-- var contact = " Ken Edwards" var email = "ken" var emailHost = "meancode.com" document.write("<a href=" + "mail" + "to:" + email + "@" + emailHost + ">" + contact + "</a>") //--> </script>This script can be put anywhere in the page, it does not have to be in the head region. If you put it in your head region, you will have to break the script up into two, one for the vars and one for the document.write. But wait, there's more! The best way to defend your email address (other then not having it on a web page altogether) is to ASCII encode it. Web Browsers render ASCII, and thus this method does not hinder the usability (or accessibility) in any way. Spam bots, as far as I know, do not know how to decode ASCII yet. It would take some smart programming, and a lot of processing power for them to do that. I strongly suggest you ASCII encode your email addresses on your web pages. Only the @ and the . (period) need to be encoded. @ = @ . = . (period) There is a nice PHP script I have found that will encode your entire email address. This does not work that well I have found, so I don't recommend it. I think that ASCII encoding your email address is the best way to defend yourself from SPAM. Please send this to anyone else who would benefit from the ASCII encoding trick. SPAM is one of those problems that affect everyone, even if you are not directly involved. I think everyone should use this trick on their web sites. It would no doubt cut down on the amount of SPAM accumulated because of harvesting bots. UPDATED
In Response to Neil T'a comments: Excellent point about accessibility. For a moment there I was not thinking of accessibility, I was just thinking of my loathing for SPAM, and how much of it I know I receive because of my email address being on web pages. I am not totally sure a screenreader could not read the name. Unless of course the screenreader did not have javascript enabled. But when you are worried about screenreaders then you are also concerned with Bobby and Section 508 compliance. So this trick is not for you. And who these days turns JavaScript off? I couple years ago I would have agreed with that statement. But not today. For university or government sites you would not use this javascript, I doubt it would pass Bobby or Section 508 standards. I would imagine ASCII encoding would fly though. I was right, Bobby did not like this. UsableNet Lift (a service/product that checks usability and accessibility standards, including section 508) did not like it either. It suggested using a NOSCRIPT tag, but said that was not in the 508 spec. Lift had other issues other then the NOSCRIPT problem. I would not want to put a standard mailto: link in a NOSCRIPT tag though. Your email address is going to be written in the source of the page, thus, accomplishing nothing. So what have we learned here? This javascript method is not accessibility friendly. Does this matter? Nope, it sure doesn't, not for 99% of you. Lift gave a green light to the ASCII encoding trick. So this is the one I suggest using unless you don't care about the non javascript folks, or you are developing university or government sites. And if encoding the @ sign and the . (period) is not enough for you, then encode the entire thing! I like the user [at] domain [dot] com trick too, but that is as counterproductive as putting an image with your email address on the page.
Web design and its related fields are still relatively young in the grand scheme of things and are still developing. One of the questions I’m often asked is, “how can I become a Web designer?” The answer isn’t simple. There are many different paths one can take to become a professional Web designer, each as different as the individuals that make up the Web design community.Source: Digital Web Magazine His point about web technologies changing so rapidly that traditional classes are not enough are spot on.Today, many successful Web professionals are self-taught and many of these have jumped into the Web via another industry. These are also the ones who are most likely to have been at it the longest. Only recently have we seen large numbers of people come straight into Web design from formal education programs. In most cases, this formal education alone doesn’t prepare one for success...