Email Addresses in ASCII Code Content from the guide to life, the universe and everything

Email Addresses in ASCII Code

1 Conversation

GuideML code in a table.

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.

LetterGuideMLHTML
 a  <ENTITY TYPE="#97"/>  &#97; 
 b  <ENTITY TYPE="#98"/>  &#98; 
 c  <ENTITY TYPE="#99"/>  &#99; 
 d  <ENTITY TYPE="#100"/>  &#100; 
 e  <ENTITY TYPE="#101"/>  &#101; 
 f  <ENTITY TYPE="#102"/>  &#102; 
 g  <ENTITY TYPE="#103"/>  &#103; 
 h  <ENTITY TYPE="#104"/>  &#104; 
 i  <ENTITY TYPE="#105"/>  &#105; 
 j  <ENTITY TYPE="#106"/>  &#106; 
 k  <ENTITY TYPE="#107"/>  &#107; 
 l  <ENTITY TYPE="#108"/>  &#108; 
 m  <ENTITY TYPE="#109"/>  &#109; 
 n  <ENTITY TYPE="#110"/>  &#110; 
 o  <ENTITY TYPE="#111"/>  &#111; 
 p  <ENTITY TYPE="#112"/>  &#112; 
 q  <ENTITY TYPE="#113"/>  &#113; 
 r  <ENTITY TYPE="#114"/>  &#114; 
 s  <ENTITY TYPE="#115"/>  &#115; 
 t  <ENTITY TYPE="#116"/>  &#116; 
 u  <ENTITY TYPE="#117"/>  &#117; 
 v  <ENTITY TYPE="#118"/>  &#118; 
 w  <ENTITY TYPE="#119"/>  &#119; 
 x  <ENTITY TYPE="#120"/>  &#120; 
 y  <ENTITY TYPE="#121"/>  &#121; 
 z  <ENTITY TYPE="#122"/>  &#122; 
 -  <ENTITY TYPE="#45"/>  &#45; 
 .  <ENTITY TYPE="#46"/>  &#46; 
 @  <ENTITY TYPE="#64"/>  &#64; 
 _  <ENTITY TYPE="#95"/>  &#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

&#109;&#101;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;

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:&#109;&#101;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;

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:&#109;&#101;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;">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:&#109;&#101;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;">Email me here</LINK>

into:

<a href="mailto:&#109;&#101;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;">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.


Bookmark on your Personal Space


Conversations About This Entry

Title
Latest Post

Edited Entry

A41117429

Infinite Improbability Drive

Infinite Improbability Drive

Read a random Edited Entry

Categorised In:


References

h2g2 Entries

External Links

Not Panicking Ltd is not responsible for the content of external internet sites

Write an Entry

"The Hitchhiker's Guide to the Galaxy is a wholly remarkable book. It has been compiled and recompiled many times and under many different editorships. It contains contributions from countless numbers of travellers and researchers."

Write an entry
Read more