网页(HTML)中的特殊字符

网页(HTML)中的特殊字符

一般来说,在HTML中,一个特殊字符有两种表达方式,一种称作数字参考,一种称作实体参考。

所谓数字参考,就是用数字来表示文档中的特殊字符,通常由前缀“&#”,加上数值,再加上后缀“;”而组成,它可以采用如下两种方式。

&#D; 其中D是一个十进制数值

下面是一些特殊字符的数字参考示例:

© 对应于特殊字符“?”

® 对应于特殊字符“?”

所谓实体参考,实际上就是用有意义的名称来表示特殊字符,通常由前缀“&”,加上字符对应的名称,再加上后缀“;”而组成,其表达方式如下:

&name; 其中name是一个用于表示字符的名称,它是区分大小写的

例如,可以使用“©”来表示版权符号“?”,用“®”来表示注册商标符号“?”,很显然,这比数字要容易记忆得多。

遗憾的是,不是所有的浏览器都能够正确认出采用实体参考方式的特殊字符,但是它们都能够识别出采用数字参考方式的特殊字符,如果可能,对于一些特别不常见的字符,应该使用数字参考方式。

当然,对于那些常见的特殊字符,使用其实体参考方式是安全的,我们在实际应用中,只要记住这些常用特殊字符字符的实体参考就足够使用了。

以下列出了其中的大部分(从网上搜集而来):

字符

数字参考

实体参考

描述

" " " Quotation mark
&  & & Ampersand
< &#60; &lt; Less than
> &#62; &gt; Greater than
 (空白) &#160; &nbsp; Non-breaking space
? &#161; &iexcl; Inverted exclamation
&#162; &cent; Cent sign
&#163; &pound; Pound sterling
¤ &#164; &curren; General currency sign
&#165; &yen; Yen sign
| &#166; &brvbar; broken vertical bar
§ &#167; &sect; Section sign
¨ &#168; &uml; Di&aelig;resis / umlaut
? &#169; &copy; Copyright
a &#170; &ordf; Feminine ordinal
? &#171; &laquo; Left angle quote
? &#172; &not; Not sign
  &#173; &sny; Soft hyphen
? &#174; &reg; Registered trademark
ˉ &#175; &macr; Macron accent
° &#176; &deg; Degree sign
± &#177; &plusmn; Plus or minus
2 &#178; &sup2; Superscript two
3 &#179; &sup3; Superscript three
&#180; &acute; Acute accent
μ &#181; &micro; Micro sign
? &#182; &para; Paragraph sign
· &#183; &middot; Middle dot
? &#184; &cedil; Cedilla
1 &#185; &supl; Superscript one
o &#186; &ordm; Masculine ordinal
? &#187; &raquo; Right angle quote
? &#188; &frac14; Fraction one quarter
? &#199; &frac12; Fraction one half
? &#190; &frac34; Fraction three-quarters
à &#192; &iquest; Inverted question mark
à &#192; &Agrave; Capital A, grave accent
á &#193; &Aacute; Capital A, acute accent
? &#194; &Acirc; Capital A, circumflex
? &#195; &Atilde; Capital A, tilde
? &#196; &Auml; di&aelig;resis / umlau
? &#197; &Aring; Capital A, ring
? &#198; &AElig; Capital AE, ligature
? &#199; &Ccedil; Capital C, cedilla
è &#200; &Egrave; Capital E, grave accent
é &#201; &Eacute; Capital E, acute accent
ê &#202; &Ecirc; Capital E, circumflex
? &#203; &Euml; di&aelig;resis / umlau
ì &#204; &Igrave; Capital I, grave accent
í &#205; &Iacute; Capital I, acute accent
? &#206; &Icirc; Capital I, circumflex
? &#207; &Imul; di&aelig;resis / umlau
D &#208; &ETH; Capital ETH, Icelandic
? &#209; &Ntilde; Capital N, tilde
ò &#210; &Ograve; Capital O, grave accent
ó &#211; &Oacute; Capital O, acute accent
? &#212; &Ocirc; Capital O, circumflex
? &#213; &Otilde; Capital O, tilde
? &#214; &Ouml; di&aelig;resis / umlau
× &#215; &times; Multiplication sign
? &#216; &Oslash; Capital O, slash
ù &#217; &Ugrave; Capital U, grave accent
ú &#218; &Uacute; Capital U, acute accent
? &#219; &Ucirc; Capital U, circumflex
ü &#220; &Uuml; di&aelig;resis / umlau
Y &#221; &Yacute; Capital Y, acute accent
T &#222; &THORN; Capital Thorn,Icelandic,
? &#223; &szlig; German sz
à &#224; &agrave; Small a, grave accent
á &#225; &aacute; Small a, acute accent
a &#226; &acirc; Small a, circumflex
? &#227; &atilde; Small a, tilde
? &#228; &auml; di&aelig;resis / umlau
? &#229; &aring; Small a, ring
? &#230; &aelig; Small ae ligature

? &#231; &ccedil; Small c, cedilla
è &#232; &egrave; Small e, grave accent
é &#233; &eacute; Small e, acute accent
ê &#234; &ecirc; Small e, circumflex
? &#235; &euml; di&aelig;resis / umlau
ì &#236; &igrave; Small i, grave accent
í &#237; &iacute; Small i, acute accent
? &#238; &icirc; Small i, circumflex
? &#239; &iuml; di&aelig;resis / umlau
e &#240; &eth; Small eth, Icelandic
? &#241; &ntilde; Small n, tilde
ò &#242; &ograve; Small o, grave accent
ó &#243; &oacute; Small o, acute accent
? &#244; &ocirc; Small o, circumflex
? &#245; &otilde; Small o, tilde
? &#246; &ouml; di&aelig;resis / umlau
÷ &#247; &divide; Division sign,
? &#248; &oslash; Small o, slash
ù &#249; &ugrave; Small u, grave accent
ú &#250; &uacute; Small u, acute accent
? &#251; &ucirc; Small u, circumflex
ü &#252; &uuml; di&aelig;resis / umlau
y &#253; &yacute; Small y, acute accetn
t &#254; &thorn; Small thorn, Icelandic
? &#255; &yuml; di&aelig;resis / umlaut

网页(HTML)中的特殊字符,布布扣,bubuko.com

网页(HTML)中的特殊字符

上一篇:Win2008 设置针对IE5.0 6.0的主页策略


下一篇:.net Post数据到指定服务器