HTML | Charsets

The web browser displays the alphabets, numbers and some other symbols correctly. This is all possible because of the required character set that web browser uses. The character set or character encoding has different character encoding standards which assign some numbers to these character set which can be used in the internet.

ASCII: American Standard Code for Information Interchange (ANSII) created this character encoding. This character encoding are used in C/C++ programming. It has 128 alphanumeric characters consisting of alphabets(A-Z) and (a-z) and some special symbols like + – * / ( ) @ etc.

ANSI(Windows-1252): American National Standards Institute (ANSI) created character encoding supported 256 characters. It is used as default character set in Microsoft Windows.

ISO-8859-1: It is used as default character set of HTML4 and also supports 256 characters. The International Standards Organization (ISO) defines the standard character sets for different alphabets/languages. It contains numbers, upper and lowercase English letters, and some special characters.

UTF-8: UTF-8 and UTF-16 standards was developed by Unicode Consortium, because the ISO-8859 character-sets are limited, and not compatible a multilingual environment. It consists all the character and punctuation symbols.



Attribute: Web browser must know the character encoding standard used the html page and this we do as given below.

Examples:

HTML4

filter_none

edit
close

play_arrow

link
brightness_4
code

<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">

chevron_right


HTML5

filter_none

edit
close

play_arrow

link
brightness_4
code

<meta charset="UTF-8">

chevron_right


Character set for different character encoding standard: Following list shows different character encoding standards with their characters and their assigned number codes.

Table 1: This table contains characters having same numbers assigned in different character encoding.

NUMBER ASCII ANSI ISO-8859-1 UTF-8 DESCRIPTION
32 Space
33 ! Exclamation Mark
34 " Quotation Mark
35 # Hash Sign
36 $ Dollar Sign
37 % Percent Sign
38 & Ampersand Sign
39 ' Apostrophe Sign
40 ( Opening Paranthesis
41 ) Closing Parenthesis
42 * Asterisk Sign
43 + Plus Sign
44 , Comma
45 - Hyphen/minus Sign
46 . Full-stop
47 / Slash/Divide Sign
48 0 Number Zero
49 1 Number One
50 2 Number Two
51 3 Number Three
52 4 Number Four
53 5 Number Five
54 6 Number Six
55 7 Number Seven
56 8 Number Eight
57 9 Number Nine
58 : Colon
59 ; Semicolon
60 < Lessthan Sign
61 = Equalto Sign
62 > Greaterthan Sign
63 ? Question Mark
64 @ at Sign
65 A Letter A
66 B Letter B
67 C Letter C
68 D Letter D
69 E Letter E
70 F Letter F
71 G Letter G
72 H Letter H
73 I Letter I
74 J Letter J
75 K Letter K
76 L Letter L
77 M Letter M
78 N Letter N
79 O Letter O
80 P Letter P
81 Q Letter Q
82 R Letter R
83 S Letter S
84 T Letter T
85 U Letter U
86 V Letter V
87 W Letter W
88 X Letter X
89 Y Letter Y
90 Z Letter Z
91 [ Opening Square Bracket
92 \ Backslash
93 ] Closing Square Bracket
94 ^ Circumflex Accent
95 _ Low Line
96 ` Grave Accent
97 a Letter a
98 b Letter b
99 c Letter c
100 d Letter d
101 e Letter e
102 f Letter f
103 g Letter g
104 h Letter h
105 i Letter i
106 j Letter j
107 k Letter k
108 l Letter l
109 m Letter m
110 n Letter n
111 o Letter o
112 p Letter p
113 q Letter q
114 r Letter r
115 s Letter s
116 t Letter t
117 u Letter u
118 v Letter v
119 w Letter w
120 x Letter x
121 y Letter y
122 z Letter z
123 { Opening Curly Bracket
124 | Vertical Line
125 } Closing Curly Bracket
126 ~ Tilde

Table 2: This table contains character having different character encoding.

ASCII ANSI ISO-8859-1 UTF-8 DESCRIPTION
127       DEL
  128    
Not Used
  130    
  131     ƒ
  132    
  133    
  134    
  135    
  136     ˆ
  137    
  138     Š
  139    
  140     Œ
141 141 141 141 Not Used
  142     Ž
143 143 143 143 Not Used
144 144 144 144 Not Used
  145    
  146    
  147    
  148    
  149    
  150    
  151    
  152     ˜
  153    
  154     š
  155    
  156     œ
157 157 157 157 Not Used
  158     ž
  159     Ÿ
160 160 160 160 no-break Space
161 161 161 ¡
  162 162 162 ¢
  163 163 163 £
  164 164 164 ¤
  165 165 165 ¥
  166 166 166 ¦
  167 167 167 §
  168 168 168 ¨
  169 169 169 ©
  170 170 170 ª
  171 171 171 «
  172 172 172 ¬
  173 173 173 ­
  174 174 174 ®
  175 175 175 ¯
  176 176 176 °
  177 177 177 ±
  178 178 178 ²
  179 179 179 ³
  180 180 180 ´
  181 181 181 µ
  182 182 182
  183 183 183 ·
  184 184 184 ¸
  185 185 185 ¹
  186 186 186 º
  187 187 187 »
  188 188 188 ¼
  189 189 189 ½
  190 190 190 ¾
  191 191 191 ¿
  192 192 192 À
  193 193 193 Á
  194 194 194 Â
  195 195 195 Ã
  196 196 196 Ä
  197 197 197 Å
  198 198 198 Æ
  199 199 199 Ç
  200 200 200 È
  201 201 201 É
  202 202 202 Ê
  203 203 203 Ë
  204 204 204 Ì
  205 205 205 Í
  206 206 206 Î
  207 207 207 Ï
  208 208 208 Ð
  209 209 209 Ñ
  210 210 210 Ò
  211 211 211 Ó
  212 212 212 Ô
  213 213 213 Õ
  214 214 214 Ö
  215 215 215 ×
  216 216 216 Ø
  217 217 217 Ù
  218 218 218 Ú
  219 219 219 Û
  220 220 220 Ü
  221 221 221 Ý
  222 222 222 Þ
  223 223 223 ß
  224 224 224 à
  225 225 225 á
  226 226 226 â
  227 227 227 ã
  228 228 228 ä
  229 229 229 å
  230 230 230 æ
  231 231 231 ç
  232 232 232 è
  233 233 233 é
  234 234 234 ê
  235 235 235 ë
  236 236 236 ì
  237 237 237 í
  238 238 238 î
  239 239 239 ï
  240 240 240 ð
  241 241 241 ñ
  242 242 242 ò
  243 243 243 ó
  244 244 244 ô
  245 245 245 õ
  246 246 246 ö
  247 247 247 ÷
  248 248 248 ø
  249 249 249 ù
  250 250 250 ú
  251 251 251 û
  252 252 252 ü
  253 253 253 ý
  254 254 254 þ
  255 255 255 ÿ


My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.