Email Addresses in ASCII Code
Created | Updated Oct 6, 2008
People often want to put email addresses on pages, both h2g2 pages and HTML based web pages. However, this can be a problem. Spammers use software called 'bots' - small programs which scour the internet for information. Not all are used unscrupulously, as many search engines use them to determine search rankings. However, spammers use them to collect email addresses contained within the text of websites.
There is a way of putting your e-mail address on web pages which can be read by people, but which is hard for bots to find. This means that you are less susceptible to spamming as someone has to physically read your page. This also works on h2g2 using GuideML.
You enter the text using ASCII codes, much like the entity name if you want to put an ampersand (&) in a GuideML page.
The Codes
The ASCII codes are the numbers. How they are used depend on whether you wish to write HTML or GuideML. The two techniques are demonstrated below
a | #97 | i | #105 | q | #113 | y | #121 |
b | #98 | j | #106 | r | #114 | z | #122 |
c | #99 | k | #107 | s | #115 | ||
d | #100 | l | #108 | t | #116 | ||
e | #101 | m | #109 | u | #117 | - | #45 |
f | #102 | n | #110 | v | #118 | . | #46 |
g | #103 | o | #111 | w | #119 | @ | #64 |
h | #104 | p | #112 | x | #120 | _ | #95 |
Text Email Addresses in GuideML
<ENTITY TYPE="#109"/><ENTITY TYPE="#101"/><ENTITY TYPE="#64"/><ENTITY TYPE="#101"/><ENTITY TYPE="#120"/><ENTITY TYPE="#97"/><ENTITY TYPE="#109"/><ENTITY TYPE="#112"/><ENTITY TYPE="#108"/><ENTITY TYPE="#101"/><ENTITY TYPE="#46"/><ENTITY TYPE="#99"/><ENTITY TYPE="#111"/><ENTITY TYPE="#109"/>
Becomes [email protected]
The above code, which gives text which can be copied and pasted, is official GuideML. However this cannot be used to create a link, or with HTML.
Text Email Addresses in HTML
To do the same in HTML you need to change <ENTITY TYPE="#XXX"/> to &#XXX;
Where XXX is the ASCII number.
The above example now becomes
me@example.com
Clickable Link Type Email Addresses in GuideML
There are two methods you can use to make a clickable email address in GuideML. To do it using GuideML links you first need to put the following,
<LINK HREF="mailto:
You then use the HTML code to give you, using the above example,
<LINK HREF="mailto:me@example.com
Then, like any link, you need to finish off with a "> followed by some text, such as 'email me', but do not use a real, plain text, email address at this point as that would defeat the purpose of using ASCII codes in the first place. This is then followed by </LINK>
So the above example will now become
<LINK HREF="mailto:me@example.com">Email me here</LINK>
Do not forget the two double-quote characters ("), one before 'mailto:' and one before the first >
and produces the following link.
Email me here
You can also use the following HTML method in GuideML pages. Neither method is approved GuideML
Clickable Link Type Email Addresses in HTML
To put an email link on an ordinary web page merely replace the word LINK in the GuideML <LINK HREF= and </LINK> with 'a' <a href= and </a>. This should be lowercase as uppercase, ie <A HREF=, will not work with all versions of XHTML.
Thus, you would change
<LINK HREF="mailto:me@example.com">Email me here</LINK>
into
<a href="mailto:me@example.com">Email me here</a>
Two further points. Firstly the above code is, as mentioned before, not approved GuideML. Secondly the above email address is an example address and is not real.
Links
A page which will create the code for a link using this technique can be found at the Email Obfuscator. However this is designed for web pages and so will produce <a href= code, not <LINK HREF= code. This code can, as stated earlier, still be used on h2g2 as it is, ie with no changes.