One of the ways that spammers get email addresses is to harvest them from websites and newsgroups. There are programs that search the web harvesting email addresses from each page they encounter, follow the links on each page, and so on. Having your email address on a web page inadvertently becomes an invitation to spammers. Here is a short, handy script that will allow one to keep one's email address available yet prevent most spam harvesting bots to find it. The script is placed in place of a piece of text or in place of the html code that provides the hyperlink to generate an email. After the code, an example follows. Note there is a fictitious email address in the example.
Below is a complete sample html file using the above code. Note that any text substituted for the "Click here to email me" will be printed. Note also that by using the apostrophe character as the string delimiter, quotation marks may be included in the text.
If you enter this file using a text editor and save it with a file extension of .htm or .html it will run in your browser upon clicking on it. It should produce the following output in your browser:
Hope this is helpful!
|