HTML ASCII Reference Manual
- Previous Page HTML Character Set
- Next Page HTML WIN-1252
ASCII is the first character set (encoding standard) used between computers on the Internet.
ISO-8859-1 (default in HTML 4.01) and UTF-8 (default in HTML5) are both built on ASCII.
ASCII character set
ASCII stands for 'American Standard Code for Information Interchange'.
It was designed in the early 1960s and is the standard character set for computers and electronic devices.
ASCII is a 7-bit character set containing 128 characters.
It includes numbers from 0-9, uppercase and lowercase English letters from A to Z, and some special characters.
The character sets used in modern computers and HTML, as well as on the Internet, are all based on ASCII.
The following table lists 128 ASCII characters and their equivalent numbers.
Printable ASCII characters
character | number | description |
---|---|---|
0 - 31 | Control characters (see below) | |
32 | space | |
! | 33 | exclamation mark |
" | 34 | quotation mark |
# | 35 | Number sign |
Number sign | $ | 36 |
Dollar sign | % | 37 |
Percent sign | & | 38 |
Ampersand | ' | 39 |
Apostrophe | ( | 40 |
Left parenthesis | ) | 41 |
Right parenthesis | * | 42 |
Asterisk | + | 43 |
Plus sign | , | Comma |
- | 45 | Hyphen |
. | 46 | Period |
/ | 47 | Slash |
0 | 48 | Digit 0 |
1 | 49 | Digit 1 |
2 | 50 | Digit 2 |
3 | 51 | Digit 3 |
4 | 52 | Digit 4 |
5 | 53 | Digit 5 |
6 | 54 | Digit 6 |
7 | 55 | Digit 7 |
8 | 56 | Digit 8 |
9 | 57 | Digit 9 |
: | 58 | Colon |
; | 59 | Semicolon |
< | 60 | Less-than |
= | 61 | Equals-to |
> | 62 | Greater-than |
? | 63 | Question mark |
@ | 64 | At sign |
A | 65 | Uppercase A |
B | 66 | Uppercase B |
C | 67 | Uppercase C |
D | 68 | Uppercase D |
E | 69 | Uppercase E |
F | 70 | Uppercase F |
G | 71 | Uppercase G |
H | 72 | Uppercase H |
I | 73 | Uppercase I |
J | 74 | Uppercase J |
K | 75 | Uppercase K |
L | 76 | Uppercase L |
M | 77 | Uppercase M |
N | 78 | Uppercase N |
O | 79 | Uppercase O |
P | 80 | Uppercase P |
Q | 81 | Uppercase Q |
R | 82 | Uppercase R |
S | 83 | Uppercase S |
T | 84 | Uppercase T |
U | 85 | Uppercase U |
V | 86 | Uppercase V |
W | 87 | Uppercase W |
X | 88 | Uppercase X |
Y | 89 | uppercase Y |
Z | 90 | uppercase Z |
[ | 91 | left square bracket |
\ | 92 | backslash |
] | 93 | right square bracket |
^ | 94 | caret |
_ | 95 | underscore |
` | 96 | grave accent |
a | 97 | lowercase a |
b | 98 | lowercase b |
c | 99 | lowercase c |
d | 100 | lowercase d |
e | 101 | lowercase e |
f | 102 | lowercase f |
g | 103 | lowercase g |
h | 104 | lowercase h |
i | 105 | lowercase i |
j | 106 | lowercase j |
k | 107 | lowercase k |
l | 108 | lowercase l |
m | 109 | lowercase m |
n | 110 | lowercase n |
o | 111 | lowercase o |
p | 112 | lowercase p |
q | 113 | lowercase q |
r | 114 | lowercase r |
s | 115 | lowercase s |
t | 116 | lowercase t |
u | 117 | lowercase u |
v | 118 | lowercase v |
w | 119 | lowercase w |
x | 120 | lowercase x |
y | 121 | lowercase y |
z | 122 | lowercase z |
{ | 123 | left curly brace |
| | 124 | vertical bar |
} | 125 | right curly brace |
~ | 126 | tilde |
ASCII device control characters
ASCII control characters (range 00-31, plus 127) are intended to control hardware devices.
control characters (excluding horizontal tab, newline, and carriage return) are irrelevant to HTML documents.
character | number | description |
---|---|---|
NUL | 00 | null character |
SOH | 01 | start of header |
STX | 02 | start of text |
ETX | 03 | end of text |
EOT | 04 | end of transmission |
ENQ | 05 | enquiry |
ACK | 06 | acknowledge |
BEL | 07 | bell (ring) |
BS | 08 | backspace |
HT | 09 | horizontal tab |
LF | 10 | line feed |
VT | 11 | vertical tab |
FF | 12 | form feed |
CR | 13 | carriage return |
SO | 14 | shift out |
SI | 15 | shift in |
DLE | 16 | data link escape |
DC1 | 17 | device control 1 |
DC2 | 18 | device control 2 |
DC3 | 19 | device control 3 |
DC4 | 20 | device control 4 |
NAK | 21 | negative acknowledge |
SYN | 22 | synchronize |
ETB | 23 | end transmission block |
CAN | 24 | cancel |
EM | 25 | end of medium |
SUB | 26 | substitute |
ESC | 27 | escape |
FS | 28 | file separator |
GS | 29 | group separator |
RS | 30 | record separator |
US | 31 | unit separator |
DEL | 127 | delete (rubout) |
- Previous Page HTML Character Set
- Next Page HTML WIN-1252