Google
 

Monday, December 3, 2007

Special Characters

(trademark, copyright, etc)
 

Displaying special characters in HTML

 

When you are creating HTML documents some characters may have to be coded in a different way.

 

For example if you wanted to include the character " < " on a page without it being interpreted as part of the HTML coding you could use &lt; where lt means Less Than.

Equally to include the character " > " you could use &gt; where gt means Greater Than.

These characters can also be represented by using their
ISO 8859-1 equivalent as described below.

Using ISO 8859-1 codes to represent any special characters is fairly straight forward, it's achieved by placing the # character in the code followed by the corresponding ISO-8859-1 Number.

for example, to represent the character ® you could use &#174; where 174 is the ISO 8859-1 code for the symbol to be represented.

Another example would be the % character, this would be coded as &#37; and the / character would be coded as &#47; .

Below is a list of common characters and their equivalent :

" $ " - &#36;

" * " - &#42;

" + " - &#43;

" - " - &#45;

" = " - &#61;

" / " - &#47;

" ® " - &#174;

" @ " - &#64;

No comments: