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. Out there on the Internet are small programs called 'robots', or 'bots' for short, which spend 24 hours a day scanning web pages for information. Many of these are used by search engines such as Google to keep track of what's on the Internet. Spammers, on the other hand, use such bots to collect email addresses contained within the text of websites.
It is possible to put your email address on a web page in a way that can be read by people but is hard for bots to find. This means that you are less susceptible to spamming, as someone has to physically read your page to find the address.
Instead of typing the letters of your email address, 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 associated with each letter. How they are used depend on whether you wish to write GuideML (the language of h2g2) or HTML (used in many other places on the Internet). The two techniques are demonstrated below.
Letter | GuideML | HTML |
a | <ENTITY TYPE="#97"/> | a |
b | <ENTITY TYPE="#98"/> | b |
c | <ENTITY TYPE="#99"/> | c |
d | <ENTITY TYPE="#100"/> | d |
e | <ENTITY TYPE="#101"/> | e |
f | <ENTITY TYPE="#102"/> | f |
g | <ENTITY TYPE="#103"/> | g |
h | <ENTITY TYPE="#104"/> | h |
i | <ENTITY TYPE="#105"/> | i |
j | <ENTITY TYPE="#106"/> | j |
k | <ENTITY TYPE="#107"/> | k |
l | <ENTITY TYPE="#108"/> | l |
m | <ENTITY TYPE="#109"/> | m |
n | <ENTITY TYPE="#110"/> | n |
o | <ENTITY TYPE="#111"/> | o |
p | <ENTITY TYPE="#112"/> | p |
q | <ENTITY TYPE="#113"/> | q |
r | <ENTITY TYPE="#114"/> | r |
s | <ENTITY TYPE="#115"/> | s |
t | <ENTITY TYPE="#116"/> | t |
u | <ENTITY TYPE="#117"/> | u |
v | <ENTITY TYPE="#118"/> | v |
w | <ENTITY TYPE="#119"/> | w |
x | <ENTITY TYPE="#120"/> | x |
y | <ENTITY TYPE="#121"/> | y |
z | <ENTITY TYPE="#122"/> | z |
- | <ENTITY TYPE="#45"/> | - |
. | <ENTITY TYPE="#46"/> | . |
@ | <ENTITY TYPE="#64"/> | @ |
_ | <ENTITY TYPE="#95"/> | _ |
A Text Email Address in GuideML
Just replace each letter and symbol in your email address with the appropriate 'entity'. Thus, to enter the email address [email protected], just put the following in your 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"/>
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.
A Text Email Address in HTML
To do the same in HTML, you need to use the &#XXX; form of the code, from the third column of the table.
The address [email protected] now becomes
me@example.com
An Email Address as a Clickable Link in GuideML
You may want to display your email address as a link. When the reader clicks on the link, they will be brought to their email program, with the address already filled in in the address field. 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>
It produces the following link. Try clicking on it!
Email me here
Do not forget the two double-quote characters ("), one before 'mailto:' and one before the first > symbol.
You can also use the following HTML method in GuideML pages. Neither method is approved GuideML.
An Email Address as a Clickable Link in HTML
To put an email link on an ordinary web page, simply replace the words 'LINK' and 'HREF' in the GuideML with 'a' and 'href'. You should use lowercase letters, as uppercase HTML will occasionally cause problems.
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. This is designed for standard web pages and so will produce the HTML 'a' version of the code rather than the GuideML 'LINK' version. As stated earlier, this code can still be used on h2g2 with no changes.