W3C home > Mailing lists > Public > w3c-wai-ig@w3.org > July to September 2002

RE: non-sgml characters - Tables of characters in HTML

From: Jon Hanna <jon@spin.ie>
Date: Wed, 17 Jul 2002 10:59:56 +0100
To: <w3c-wai-ig@w3.org>

> I will find this table very useful.
> One thing a Newbie might not get though (I am a Newbie) - is what to
> append to the numbers provided in the table to use them in the html
> document.  I assume from the example provided that the numbers in the
> table are to be used with a "&#" prefix.  Is this correct?

Yes, you can either:

1. put & before and ; after the more memorable character reference in the
first column - so where it says nbsp is for a non-breaking space that means
that you can use &nbsp;
2. put &# before and ; after the decimal representation of the character's
UCS code point - so where it says 160 is for a non-breaking space that means
that you can use &#160; You can also use this form for characters that
aren't in the tables, but which are defined by Unicode.

You can also use the hexadecimal version with &#x so for the same character
as above you would have &#xA0; however some browsers may have issues with
this (HTML4.0 allowing it was pre-emptively using a proposed revision to
SGML, XHMTL1.0 automatically allows it because XML allows it).

In HTML4.0 and earlier, but not in XHTML1.0, you are technically allowed to
leave off the final semi-colon in some situations, but it's never advisable
and can cause problems even if you have abided strictly by the rules about
when you can do so.

> Thank you for the this chart.

NP. It might be a good idea to save a back-up, as I may have to take it down
some time in the future.
Received on Wednesday, 17 July 2002 05:59:38 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:36:10 UTC