W3C home > Mailing lists > Public > www-talk@w3.org > March to April 2003

Re: special chars: male and female sign

From: <AndrewWatt2001@aol.com>
Date: Fri, 11 Apr 2003 05:12:29 EDT
Message-ID: <127.26f218ff.2bc7e0fd@aol.com>
To: marco_bleeker@hetnet.nl
CC: html@handleidinghtml.nl, www-talk@w3.org
In a message dated 11/04/2003 07:30:53 GMT Daylight Time, 
marco_bleeker@hetnet.nl 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 &#0065; (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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:33:04 UTC