Content deleted Content added
Added description of HTML code and removed leading zeros from numbers |
|||
Line 1:
A ''numeric character reference'' in HTML refers to a character by its [[Universal Character Set]]/[[Unicode]] ''code point'', and uses the format
Not all [[web browser]]s or [[email client]]s used by receivers of HTML documents, or [[text editor]]s used by authors of HTML documents, will be able to '''render all HTML characters'''. Most modern [[web browsers]] are able to display many more characters than the latest versions of [[Microsoft]] [[Internet Explorer]]. This is due to different "font linking" capabilities that allow [[glyph]]s to be used from fonts according to what characters are needed and supported by the fonts on the system.▼
:<code>&#</code>''nnnn''<code>;</code>
or
:<code>&#x</code>''hhhh''<code>;</code>
where ''nnnn'' is the code point in [[decimal]] form, and ''hhhh'' is the code point in [[hexadecimal]] form. The ''x'' must be lowercase in XML documents. The ''nnnn'' or ''hhhh'' may be any number of digits and may include leading zeros. The ''hhhh'' may mix uppercase and lowercase, though uppercase is the usual style.
▲Not all [[web browser]]s or [[email client]]s used by receivers of HTML documents, or [[text editor]]s used by authors of HTML documents, will be able to
For codes from 0 to 127, the original 7-bit [[ASCII]] standard set, most of these characters can be used without a character reference. Codes from 160 to 255 can all be created using [[List of XML and HTML character entity references|character entity names]]. Only a few higher-numbered codes can be created using entity names, but all can be created by decimal number character reference.
Line 7 ⟶ 15:
HTML forbids [http://www.w3.org/TR/REC-html40/sgml/sgmldecl.html] the use of the characters with [[Universal Character Set]]/[[Unicode]] code points
* 0 to 31, except 9, 10, and 13 (C0 [[control characters]])
* 127 (DEL character)
* 128 to 159 (C1 [[control characters]])
* 55296 to 57343 (xD800-xDFFF, the [[UTF-16]] surrogate halves)
These characters are ''not even allowed by reference''. That is, you are not even allowed to write them as [[numeric character reference]]s. However, references to characters
The characters
{{DEFAULTSORT:Html Decimal Character Rendering}}
|