HTML and CSS Reference
In-Depth Information
A
APPENDIX
Character Entities
Keyboard characters such as < and > have special meanings to (X)HTML because they
are part of HTML tags and must be encoded. Other characters, such as certain
foreign language accent characters and special symbols, can be difficult to specify,
depending on the keyboard being used. To address escaping of special-purpose characters
and inserting a wide range of characters and symbols, character entities should be
employed.
The format of character entities is in general
&code;
where code may be a
• A decimal form like &#203;
• A hex form like &#x00CB; or stripped of leading zeros, simply &xCB;
• A named value if available, such as &Euml;
N OTE When using a hex form, either a lowercase or uppercase x may be used as well as upper-
and lowercase values for digits A-F, so &#XCB; and &#xCB; and &#xCb; and so on are all
equivalent. Case sensitivity is not, however, guaranteed for named entities and may result in
errors or wrong characters. Good style would suggest lowercase for the hex symbol and uppercase
for the digits.
As an example,
<p> Numeric entity decimal: &#163; </p>
<p> Numeric entity hex: &#x00A3; </p>
<p> Named entity: &pound; </p>
727
 
Search WWH ::




Custom Search