HTML and CSS Reference
In-Depth Information
Appendix A. Character Entities
Characters not found in the normal alphanumeric character set, such as < and &, may be spe-
cified in HTML and XHTML documents using character references. This process is known
as escaping the character. Escaped characters are indicated by character references that begin
with & and end with ; . The character may be referred to by its Numeric Character Reference
(NCR) or a predefined character entity name.
A Numeric Character Reference refers to a character by its Unicode code point in either
decimalorhexadecimal form.Hexadecimal valuesareindicatedbyan“x”: &#xhhhh; .Decim-
al character references use the syntax &#nnnn; (no “x” character). For example, the em-dash
(—) character has the Unicode code point U+02014, which can be identified as &#x2014
(hexadecimal) or &#8212; (decimal) in an HTML document.
Character entities (or Named Character References ) are abbreviated names for characters,
such as &lt; for the less-than symbol. Character entities are predefined in markup languages
such as HTML and XHTML as a convenience to authors because they may be easier to re-
member than Numeric Character References. HTML 4.01 defined 252 character entities. That
number has grown to more than 2,000 in HTML5.
The remainder of this section lists only the most commonly used character references and en-
tities. For additional character references, see the following resources:
W3C Character Entity Reference Chart
This visual chart organizes 488 characters in numerical order by Unicode code point. It
features extra large characters for easy scanning and lists both numeric and named refer-
ences.
HTML5 Named Character Reference list
This definitive list of more than 2,000 references is organized alphabetically by entity
name and includes Unicode code points only.
Search WWH ::




Custom Search