ASCII Character Set
HTML and XHTML documents use the standard 7-bit ASCII
character set in their source. The first 31 characters in ASCII (not
listed) are such device controls as backspace () and carriage return ( ) and are not appropriate for use in
HTML documents.
HTML 4.01 defines only four entities in this character range: less
than (<, <), greater than (<, >), ampersand (&, &), and quotation mark (", "), that are necessary for escaping
characters that may be interpreted as markup. XHTML also includes the
' entity that is included in
every XML language. In XHTML documents, the ampersand symbol (&) must always be escaped in attribute
values. For better compatibility with XML parsers, authors should use
numerical character references instead of named character references for
all other character entities.
|
Decimal |
Hex |
Entity |
Symbol |
Description |
|---|---|---|---|---|
|
|
|
Space | ||
|
|
|
! |
Exclamation point | |
|
|
|
|
" |
Quotation mark |
|
|
|
# |
Octothorpe | |
|
|
|
$ |
Dollar symbol | |
|
|
|
% |
Percent symbol | |
|
|
|
|
& |
Ampersand |
|
|
|
XML/XHTML only:
|
' |
Apostrophe (single quote) |
|
|
|
( |
Left parenthesis | |
|
|
|
) |
Right parenthesis | |
|
|
|
* |
Asterisk | |
|
|
|
+ |
Plus sign | |
|
|
|
, |
Comma | |
|
|
|
- |
Hyphen | |
|
|
|
. |
Period | |
|
|
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access