Re: special chars: male and female sign

In a message dated 11/04/2003 07:30:53 GMT Daylight Time, writes:

> Thanks Andrew, yes this works. I did not know about the "x" in the Unicode. 
> For other (math) codes you don't need the x in the html &#[x]0000; 
> construction. What's the difference? Thanks, Marco


The x indicates that the character reference contains a hexadecimal number.

So to print an upper case "A" for example you can use A (decimal) or &
#x0041; (hexadecimal) as in the following code.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
<p> This should be A using a decimal number in the character reference: &
<p> This should be A using a hexidecimal number: &#x0041;</p>

So, for the male and female symbols the numbers are hexadecimal (although 
they don't include the characters A-F). Omitting the "x" will cause the 
browser to attempt to display the character corresponding to the equivalent 
decimal number which, as you might expect, is not the same character.

I hope that helps.

Andrew Watt

Received on Friday, 11 April 2003 05:12:45 UTC