హ్టీఎంఎల్ కోడింగ్ (చారకెట్ సెట్)

为了正确显示 HTML 页面,Web 浏览器必须知道要使用哪个字符集。

从 ASCII 到 UTF-8

ASCII 是第一个字符编码标准。ASCII 定义了 128 种可以在互联网上使用的字符:数字(0-9)、英文字母(A-Z)和一些特殊字符,比如:! $ + - ( ) @ < >。

ISO-8859-1 是 HTML 4 的默认字符集。此字符集支持 256 个不同的字符代码。HTML 4 同时支持 UTF-8。

ANSI(Windows-1252)是原始的 Windows 字符集。 ANSI 与 ISO-8859-1 相同,不同之处在于 ANSI 具有 32 个额外的字符。

HTML5 规范鼓励 Web 开发人员使用 UTF-8 字符集,该字符集涵盖了世界上几乎所有的字符和符号!

HTML charset 属性

为了正确显示 HTML 页面,Web 浏览器必须了解页面中使用的字符集。

这在 <meta> 标签中指定:

<meta charset="UTF-8">

亲自试一试

字符集之间的差异

下表展示了上述字符集之间的区别:

Numb ASCII ANSI 8859 UTF-8 Description
32 space
33!!!!exclamation mark
34""""quotation mark
35####number sign
36$$$$dollar sign
37%%%%percent sign
3738383838&
ఏంపర్సాండ్39393939'
అపోస్ట్రాఫ్40404040(
లెఫ్ట్ పరెంటేసిస్41414141)
రెయిట్ పరెంటేసిస్42424242*
ఆస్టరిక్స్++++ప్లస్ సిగ్న్
44,,,,కమా
45----హైపన్ మినస్
46....ఫుల్ స్టాప్
47////సోలిడస్
480000నంబర్ జూన్
491111నంబర్ వన్
502222నంబర్ టు
513333నంబర్ థ్రీ
524444నంబర్ ఫోర్
535555నంబర్ ఫైవ్
546666నంబర్ సిక్స్
557777నంబర్ సెవెన్
568888నంబర్ ఎన్
579999నంబర్ నెన్
58::::కోలన్
59;;;;సెమికాలన్
60<<<<తక్కువ సిగ్న్
61====సమానతా సిగ్న్
62>>>>మేర సిగ్న్
63????ప్రశ్నాకరణం
64@@@@కమర్షియల్ అట్
65లాటిన్ కేపిటల్ ఎ
66బిబిబిబిలాటిన్ కేపిటల్ బి
67సిసిసిసిలాటిన్ కేపిటల్ సి
68డిడిడిడిలాటిన్ కేపిటల్ డి
69లాటిన్ కేపిటల్ ఇ
70ఎఫ్ఎఫ్ఎఫ్ఎఫ్లాటిన్ కేపిటల్ ఎఫ్
71జిజిజిజిలాటిన్ కేపిటల్ జి
72హేహేహేహేలాటిన్ కేపిటల్ హే
73లాటిన్ కేపిటల్ ఐ
74జేజేజేజేలాటిన్ కేపిటల్ జే
75కేకేకేకేలాటిన్ కేపిటల్ కే
76ఎల్ఎల్ఎల్ఎల్లాటిన్ కేపిటల్ ఎల్
77ఎమ్ఎమ్ఎమ్ఎమ్లాటిన్ కేపిటల్ ఎమ్
78ఎన్ఎన్ఎన్ఎన్లాటిన్ కేపిటల్ ఎన్
79లాటిన్ కేపిటల్ లెటర్ ఒ
8080808080P
Latin capital letter P81818181Q
Latin capital letter Q82828282R
Latin capital letter R83838383S
Latin capital letter S84848484T
Latin capital letter T85858585U
Latin capital letter U86868686V
Latin capital letter V87878787W
Latin capital letter W88888888X
Latin capital letter X89898989Y
Latin capital letter Y90909090Z
Latin capital letter Z91919191[
left square bracket92929292\
reverse solidus93939393]
right square bracket95959595^
circumflex accent____low line
96````grave accent
97aaaaLatin small letter a
98bbbbLatin small letter b
99ccccLatin small letter c
100ddddLatin small letter d
101eeeeLatin small letter e
102ffffLatin small letter f
103ggggLatin small letter g
104hhhhLatin small letter h
105iiiiLatin small letter i
106jjjjLatin small letter j
107kkkkLatin small letter k
108llllLatin small letter l
109mmmmLatin small letter m
110nnnnLatin small letter n
111ooooLatin small letter o
112ppppLatin small letter p
113qqqqLatin small letter q
114rrrrLatin small letter r
115ssssLatin small letter s
116ttttLatin small letter t
117uuuuLatin small letter u
118vvvvLatin small letter v
119wwwwLatin small letter w
120xxxxLatin small letter x
121yyyyLatin small letter y
122zzzzLatin small letter z
123{{{{left curly bracket
124||||vertical line
125}}}}right curly bracket
126~~~~tilde
127114    
115 116  117
118 119119119single right-pointing angle quotation mark
120 లాటిన్ స్మాల్ లెటర్ క్స్  121
లాటిన్ స్మాల్ లెటర్ వై 122  లాటిన్ స్మాల్ లెటర్ జి
123 లెఫ్ట్ కర్నుబర్ బ్రేకెట్  124
వర్టికల్ లైన్ 125  రెయిట్ కర్నుబర్ బ్రేకెట్
126 టిల్డ్  127
DEL 128  యూరో సాఇన్
129 130  సింగిల్ లో-9 క్వోటేషన్ మార్క్
131 లాటిన్ స్మాల్ లెటర్ ఫ్ విత్ హూక్  132
డబుల్ లో-9 క్వోటేషన్ మార్క్ 133  హార్డ్వెయర్ ఎలిప్సిస్
134 డాగ్గర్  135
డబుల్ డాగ్గర్ 136  మోడిఫైర్ లెటర్ సిర్క్యూమ్ఫ్లెక్స్ అకెంట్
137 పెర్ మిల్ సాఇన్పెర్ మిల్ సాఇన్పెర్ మిల్ సాఇన్single right-pointing angle quotation mark
138 లాటిన్ కేపిటల్ ఎస్ విత్ కారోన్  139
140 లాటిన్ కేపిటల్ లిగేచర్ ఒఇలాటిన్ కేపిటల్ లిగేచర్ ఒఇలాటిన్ కేపిటల్ లిగేచర్ ఒఇsingle right-pointing angle quotation mark
141 142142142single right-pointing angle quotation mark
లాటిన్ కేపిటల్ లెటర్ జి విత్ కారోన్ 143  144
145 146  రెయిట్ సింగిల్ క్వోటేషన్ మార్క్
147 లెఫ్ట్ సింగిల్ క్వోటేషన్ మార్క్  లెఫ్ట్ డబుల్ క్వోటేషన్ మార్క్
148 రెయిట్ సింగిల్ క్వోటేషన్ మార్క్  రెయిట్ డబుల్ క్వోటేషన్ మార్క్
149 •  bullet
150 –  en dash
151 నుండి ఉండబడుతుంది  149
• bullet  –
en dash —  em dash
152 ˜  small tilde
153 ™  trade mark sign
154 š  Latin small letter s with caron
155 ›››single right-pointing angle quotation mark
156 œ  Latin small ligature oe
157   NOT USED
158    ž
Latin small letter z with caron 159159159Ÿ
Latin capital letter Y with diaeresis 160160160no-break space
¡ inverted exclamation markinverted exclamation markinverted exclamation mark¢
cent sign £££pound sign
¤ currency signcurrency signcurrency sign¥
yen sign 166166166¦
broken bar 167167167§
section sign 168168168¨
diaeresis 169169169©
copyright sign 170170170ª
feminine ordinal indicator 171171171«
left-pointing double angle quotation mark 172172172¬
not sign ­­­soft hyphen
174 ®®®registered sign
175 ¯¯¯macron
176 °°°degree sign
177 ±±±plus-minus sign
178 ²²²superscript two
179 ³³³superscript three
180 ´´´acute accent
181 µµµmicro sign
182 pilcrow sign
183 ···middle dot
184 ¸¸¸cedilla
185 ¹¹¹superscript one
186 ºººmasculine ordinal indicator
187 »»»right-pointing double angle quotation mark
188 ¼¼¼vulgar fraction one quarter
189 ½½½vulgar fraction one half
190 ¾¾¾vulgar fraction three quarters
191 ¿¿¿inverted question mark
192 ÀÀÀLatin capital letter A with grave
193 ÁÁÁLatin capital letter A with acute
194 ÂÂÂLatin capital letter A with circumflex
195 ÃÃÃLatin capital letter A with tilde
196 ÄÄÄLatin capital letter A with diaeresis
197 ÅÅÅLatin capital letter A with ring above
198 ÆÆÆLatin capital letter AE
199 ÇÇÇLatin capital letter C with cedilla
200 ÈÈÈLatin capital letter E with grave
201 ÉÉÉLatin capital letter E with acute
202 ÊÊÊLatin capital letter E with circumflex
203 ËËËLatin capital letter E with diaeresis
204 ÌÌÌLatin capital letter I with grave
205 ÍÍÍLatin capital letter I with acute
206 ÎÎÎLatin capital letter I with circumflex
207 ÏÏÏLatin capital letter I with diaeresis
208 ÐÐÐLatin capital letter Eth
209 ÑÑÑLatin capital letter N with tilde
210 ÒÒÒLatin capital letter O with grave
211 ÓÓÓLatin capital letter O with acute
212 ÔÔÔLatin capital letter O with circumflex
213 ÕÕÕLatin capital letter O with tilde
214 ÖÖÖLatin capital letter O with diaeresis
215 ×××multiplication sign
216 ØØØLatin capital letter O with stroke
217 ÙÙÙLatin capital letter U with grave
218 ÚÚÚLatin capital letter U with acute
219 ÛÛÛLatin capital letter U with circumflex
220 ÜÜÜLatin capital letter U with diaeresis
221 ÝÝÝLatin capital letter Y with acute
222 ÞÞÞLatin capital letter Thorn
223 ßßßLatin small letter sharp s
224 àààLatin small letter a with grave
225 áááLatin small letter a with acute
226 âââLatin small letter a with circumflex
227 ãããLatin small letter a with tilde
228 äääLatin small letter a with diaeresis
229 åååLatin small letter a with ring above
230 æææLatin small letter ae
231 çççLatin small letter c with cedilla
232 èèèLatin small letter e with grave
233 éééలాటిన్ చిన్న అక్షరం e అక్యూట్
234 êêêలాటిన్ చిన్న అక్షరం e కర్సిఫ్లెక్స్
235 ëëëలాటిన్ చిన్న అక్షరం e దైయరెసిస్
236 ìììలాటిన్ చిన్న అక్షరం i గ్రావ్
237 íííలాటిన్ చిన్న అక్షరం i అక్యూట్
238 îîîలాటిన్ చిన్న అక్షరం i కర్సిఫ్లెక్స్
239 ïïïలాటిన్ చిన్న అక్షరం i దైయరెసిస్
240 ðððలాటిన్ చిన్న అక్షరం eth
241 ñññలాటిన్ చిన్న అక్షరం n టిల్డ్
242 òòòలాటిన్ చిన్న అక్షరం o గ్రావ్
243 óóóలాటిన్ చిన్న అక్షరం o అక్యూట్
244 ôôôలాటిన్ చిన్న అక్షరం o కర్సిఫ్లెక్స్
245 õõõలాటిన్ చిన్న అక్షరం o టిల్డ్
246 öööలాటిన్ చిన్న అక్షరం o దైయరెసిస్
247 ÷÷÷విభజన సంకేతం
248 øøøలాటిన్ చిన్న అక్షరం o స్ట్రాక్
249 ùùùలాటిన్ చిన్న అక్షరం u గ్రావ్
250 úúúలాటిన్ చిన్న అక్షరం u అక్యూట్
251 ûûûలాటిన్ చిన్న అక్షరం కర్సిఫ్లెక్స్
252 üüüలాటిన్ చిన్న అక్షరం u దైయరెసిస్
253 ýýýలాటిన్ చిన్న అక్షరం y అక్యూట్
254 þþþలాటిన్ చిన్న అక్షరం thorn
255 ÿÿÿలాటిన్ చిన్న అక్షరం y దైయరెసిస్

ASCII చారకసమూహం

ASCII ఉపయోగిస్తుంది 0 నుండి 31 (మరియు 127) మధ్య విలువలను కంట్రోల్ చారక్స్ గా.

ASCII 使用 32 到 126 的值表示字母、数字和符号。

ASCII 不使用 128 到 255 之间的值。

ANSI 字符集 (Windows-1252)

对于 0 到 127 的值,ANSI 与 ASCII 相同。

ANSI 有一组专有的字符,其值从 128 到 159。

对于 160 到 255 的值,ANSI 与 UTF-8 相同。

ISO-8859-1 字符集

对于 0 到 127 的值,8859-1 与 ASCII 相同。

8859-1 不使用 128 到 159 之间的值。

对于从 160 到 255 的值,8859-1 与 UTF-8 相同。

UTF-8 字符集

对于 0 到 127 的值,UTF-8 与 ASCII 相同。

UTF-8 యుఎన్ఐసి యొక్క 12 8 నుండి 159 విలువలను ఉపయోగించదు.

160 నుండి 255 విలువల కోసం, UTF-8 యుఎన్ఐసి మరియు 8859-1 ను కలిగి ఉంటుంది.

UTF-8 విలువలు 256 నుండి కొనసాగుతుంది, కంటే ఎక్కువ 10000 వివిధ అక్షరాలను కలిగి ఉంటుంది.

మరింత పరిశీలన కొరకు మామిళ్ళ హెచ్టిఎంఎల్ అక్షరజ్ఞానం పరిశీలన మాన్యత పాఠ్యపుస్తకం చదవండి.

CSS @charset నియమం

స్టైల్స్ స్క్రిప్ట్ లో ఉపయోగించే అక్షరజ్ఞానాన్ని నిర్దేశించడానికి మీరు CSS @charset నియమాన్ని ఉపయోగించవచ్చు:

ప్రతిమాత్రం

స్టైల్స్ స్క్రిప్ట్ కోడింగ్ ను యూనికోడ్ UTF-8 గా సెట్ చేయండి:

@charset "UTF-8";

మరింత సమాచారం కొరకు మామిళ్ళ సిఎస్ఎస్ పరిశీలన మాన్యత పాఠ్యపుస్తకం లో పొందండి CSS @charset నియమం యొక్క విషయం