your image

HTML Charset

w3schools
Related Topic
:- HTML CSS

HTML Encoding (Character Sets)

PreviousNext

To display an HTML page correctly, a web browser must know which character set to use.

From ASCII to UTF-8

ASCII was the first character encoding standard. ASCII defined 128 different characters that could be used on the internet: numbers (0-9), English letters (A-Z), and some special characters like ! $ + - ( ) @ < > .

ISO-8859-1 was the default character set for HTML 4. This character set supported 256 different character codes. HTML 4 also supported UTF-8.

ANSI (Windows-1252) was the original Windows character set. ANSI is identical to ISO-8859-1, except that ANSI has 32 extra characters.

The HTML5 specification encourages web developers to use the UTF-8 character set, which covers almost all of the characters and symbols in the world!

The HTML charset Attribute

To display an HTML page correctly, a web browser must know the character set used in the page.

This is specified in the <meta> tag:

<meta charset="UTF-8">

ADVERTISEMENT

 

Differences Between Character Sets

The following table displays the differences between the character sets described above:

NumbASCIIANSI8859UTF-8Description32



space33!!!!exclamation mark34""""quotation mark35####number sign36$$$$dollar sign37%%%%percent sign38&&&&ampersand39''''apostrophe40((((left parenthesis41))))right parenthesis42****asterisk43++++plus sign44,,,,comma45----hyphen-minus46....full stop47////solidus480000digit zero491111digit one502222digit two513333digit three524444digit four535555digit five546666digit six557777digit seven568888digit eight579999digit nine58::::colon59;;;;semicolon60<<<<less-than sign61====equals sign62>>>>greater-than sign63????question mark64@@@@commercial at65AAAALatin capital letter A66BBBBLatin capital letter B67CCCCLatin capital letter C68DDDDLatin capital letter D69EEEELatin capital letter E70FFFFLatin capital letter F71GGGGLatin capital letter G72HHHHLatin capital letter H73IIIILatin capital letter I74JJJJLatin capital letter J75KKKKLatin capital letter K76LLLLLatin capital letter L77MMMMLatin capital letter M78NNNNLatin capital letter N79OOOOLatin capital letter O80PPPPLatin capital letter P81QQQQLatin capital letter Q82RRRRLatin capital letter R83SSSSLatin capital letter S84TTTTLatin capital letter T85UUUULatin capital letter U86VVVVLatin capital letter V87WWWWLatin capital letter W88XXXXLatin capital letter X89YYYYLatin capital letter Y90ZZZZLatin capital letter Z91[[[[left square bracket92\\\\reverse solidus93]]]]right square bracket94^^^^circumflex accent95____low line96````grave accent97aaaaLatin small letter a98bbbbLatin small letter b99ccccLatin small letter c100ddddLatin small letter d101eeeeLatin small letter e102ffffLatin small letter f103ggggLatin small letter g104hhhhLatin small letter h105iiiiLatin small letter i106jjjjLatin small letter j107kkkkLatin small letter k108llllLatin small letter l109mmmmLatin small letter m110nnnnLatin small letter n111ooooLatin small letter o112ppppLatin small letter p113qqqqLatin small letter q114rrrrLatin small letter r115ssssLatin small letter s116ttttLatin small letter t117uuuuLatin small letter u118vvvvLatin small letter v119wwwwLatin small letter w120xxxxLatin small letter x121yyyyLatin small letter y122zzzzLatin small letter z123{{{{left curly bracket124||||vertical line125}}}}right curly bracket126~~~~tilde127DEL



128


euro sign129
NOT USED130


single low-9 quotation mark131
ƒ

Latin small letter f with hook132


double low-9 quotation mark133


horizontal ellipsis134


dagger135


double dagger136
ˆ

modifier letter circumflex accent137


per mille sign138
Š

Latin capital letter S with caron139


single left-pointing angle quotation mark140
Œ

Latin capital ligature OE141
NOT USED142
Ž

Latin capital letter Z with caron143
NOT USED144
NOT USED145


left single quotation mark146


right single quotation mark147


left double quotation mark148


right double quotation mark149


bullet150


en dash151


em dash152
˜

small tilde153


trade mark sign154
š

Latin small letter s with caron155


single right-pointing angle quotation mark156
œ

Latin small ligature oe157
NOT USED158
ž

Latin small letter z with caron159
Ÿ

Latin capital letter Y with diaeresis160



no-break space161
¡¡¡inverted exclamation mark162
¢¢¢cent sign163
£££pound sign164
¤¤¤currency sign165
¥¥¥yen sign166
¦¦¦broken bar167
§§§section sign168
¨¨¨diaeresis169
©©©copyright sign170
ªªªfeminine ordinal indicator171
«««left-pointing double angle quotation mark172
¬¬¬not sign173
­­­soft hyphen174
®®®registered sign175
¯¯¯macron176
°°°degree sign177
±±±plus-minus sign178
²²²superscript two179
³³³superscript three180
´´´acute accent181
µµµmicro sign182
¶¶¶pilcrow sign183
···middle dot184
¸¸¸cedilla185
¹¹¹superscript one186
ºººmasculine ordinal indicator187
»»»right-pointing double angle quotation mark188
¼¼¼vulgar fraction one quarter189
½½½vulgar fraction one half190
¾¾¾vulgar fraction three quarters191
¿¿¿inverted question mark192
ÀÀÀLatin capital letter A with grave193
ÁÁÁLatin capital letter A with acute194
ÂÂÂLatin capital letter A with circumflex195
ÃÃÃLatin capital letter A with tilde196
ÄÄÄLatin capital letter A with diaeresis197
ÅÅÅLatin capital letter A with ring above198
ÆÆÆLatin capital letter AE199
ÇÇÇLatin capital letter C with cedilla200
ÈÈÈLatin capital letter E with grave201
ÉÉÉLatin capital letter E with acute202
ÊÊÊLatin capital letter E with circumflex203
ËËËLatin capital letter E with diaeresis204
ÌÌÌLatin capital letter I with grave205
ÍÍÍLatin capital letter I with acute206
ÎÎÎLatin capital letter I with circumflex207
ÏÏÏLatin capital letter I with diaeresis208
ÐÐÐLatin capital letter Eth209
ÑÑÑLatin capital letter N with tilde210
ÒÒÒLatin capital letter O with grave211
ÓÓÓLatin capital letter O with acute212
ÔÔÔLatin capital letter O with circumflex213
ÕÕÕLatin capital letter O with tilde214
ÖÖÖLatin capital letter O with diaeresis215
×××multiplication sign216
ØØØLatin capital letter O with stroke217
ÙÙÙLatin capital letter U with grave218
ÚÚÚLatin capital letter U with acute219
ÛÛÛLatin capital letter U with circumflex220
ÜÜÜLatin capital letter U with diaeresis221
ÝÝÝLatin capital letter Y with acute222
ÞÞÞLatin capital letter Thorn223
ßßßLatin small letter sharp s224
àààLatin small letter a with grave225
áááLatin small letter a with acute226
âââLatin small letter a with circumflex227
ãããLatin small letter a with tilde228
äääLatin small letter a with diaeresis229
åååLatin small letter a with ring above230
æææLatin small letter ae231
çççLatin small letter c with cedilla232
èèèLatin small letter e with grave233
éééLatin small letter e with acute234
êêêLatin small letter e with circumflex235
ëëëLatin small letter e with diaeresis236
ìììLatin small letter i with grave237
íííLatin small letter i with acute238
îîîLatin small letter i with circumflex239
ïïïLatin small letter i with diaeresis240
ðððLatin small letter eth241
ñññLatin small letter n with tilde242
òòòLatin small letter o with grave243
óóóLatin small letter o with acute244
ôôôLatin small letter o with circumflex245
õõõLatin small letter o with tilde246
öööLatin small letter o with diaeresis247
÷÷÷division sign248
øøøLatin small letter o with stroke249
ùùùLatin small letter u with grave250
úúúLatin small letter u with acute251
ûûûLatin small letter with circumflex252
üüüLatin small letter u with diaeresis253
ýýýLatin small letter y with acute254
þþþLatin small letter thorn255
ÿÿÿLatin small letter y with diaeresis

The ASCII Character Set

ASCII uses the values from 0 to 31 (and 127) for control characters.

ASCII uses the values from 32 to 126 for letters, digits, and symbols.

ASCII does not use the values from 128 to 255.

The ANSI Character Set (Windows-1252)

ANSI is identical to ASCII for the values from 0 to 127.

ANSI has a proprietary set of characters for the values from 128 to 159.

ANSI is identical to UTF-8 for the values from 160 to 255.

The ISO-8859-1 Character Set

ISO-8859-1 is identical to ASCII for the values from 0 to 127.

ISO-8859-1 does not use the values from 128 to 159.

ISO-8859-1 is identical to UTF-8 for the values from 160 to 255.

The UTF-8 Character Set

UTF-8 is identical to ASCII for the values from 0 to 127.

UTF-8 does not use the values from 128 to 159. 

UTF-8 is identical to both ANSI and 8859-1 for the values from 160 to 255.

UTF-8 continues from the value 256 with more than 10 000 different characters.

Comments