Re: special chars: male and female sign

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

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"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<title>Untitled</title>
</head>
<body>
<p> This should be A using a decimal number in the character reference: &
#0065;</p>
<p> This should be A using a hexidecimal number: &#x0041;</p>
</body>
</html>

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