1实体字符
一些字符在 HTML 中是预留的,拥有特殊的含义,比如小于号‘<’用于定义 HTML 标签的开始。如果我们希望浏览器正确地显示这些字符,我们必须在 HTML 源码中插入字符实体。
字符实体有三部分:一个和号‘&’和一个实体名称(或者一个‘#’ 和一个实体编号),以及一个分号‘;’。
要在 HTML 文档中显示小于号,我们需要这样写:< 或者‘<’最后的效果则是<
使用实体名称而不是实体编号的好处在于,名称相对来说更容易记忆。而这么做的坏处是,并不是所有的浏览器都支持最新的实体名称,然而几乎所有的浏览器对实体编号的支持都很好。
2ASCI
结果
|
描述
|
实体名称
|
实体编号
|
---|---|---|---|
"
|
quotation mark
|
"
|
"
|
‘
|
apostrophe
|
'
|
‘
|
&
|
ampersand
|
&
|
&
|
<
|
less-than
|
<
|
<
|
>
|
greater-than
|
>
|
>
|
3符号实体编辑
结果
|
描述
|
实体名称
|
实体编号
|
---|---|---|---|
non-breaking space
|
|
||
¡
|
inverted exclamation mark
|
¡
|
¡
|
¢
|
cent
|
¢
|
¢
|
£
|
pound
|
£
|
£
|
¤
|
currency
|
¤
|
¤
|
¥
|
yen
|
¥
|
¥
|
|
|
broken vertical bar
|
¦
|
¦
|
§
|
section
|
§
|
§
|
¨
|
spacing diaeresis
|
¨
|
¨
|
©
|
copyright
|
©
|
©
|
a
|
feminine ordinal indicator
|
ª
|
ª
|
«
|
angle quotation mark (left)
|
«
|
«
|
¬
|
negation
|
¬
|
¬
|
soft hyphen
|
­
|
||
®
|
registered trademark
|
®
|
®
|
ˉ
|
spacing macron
|
¯
|
¯
|
°
|
degree
|
°
|
°
|
±
|
plus-or-minus
|
±
|
±
|
2
|
superscript 2
|
²
|
²
|
3
|
superscript 3
|
³
|
³
|
′
|
spacing acute
|
´
|
´
|
μ
|
micro
|
µ
|
µ
|
¶
|
paragraph
|
¶
|
¶
|
·
|
middle dot
|
·
|
·
|
¸
|
spacing cedilla
|
¸
|
¸
|
1
|
superscript 1
|
¹
|
¹
|
o
|
masculine ordinal indicator
|
º
|
º
|
»
|
angle quotation mark (right)
|
»
|
»
|
¼
|
fraction 1/4
|
¼
|
¼
|
½
|
fraction 1/2
|
½
|
½
|
¾
|
fraction 3/4
|
¾
|
¾
|
¿
|
inverted question mark
|
¿
|
¿
|
×
|
multiplication
|
×
|
×
|
÷
|
division
|
÷
|
÷
|
4字符实体编辑
结果
|
描述
|
实体名称
|
实体编号
|
---|---|---|---|
à
|
capital a, grave accent
|
À
|
À
|
á
|
capital a, acute accent
|
Á
|
Á
|
Â
|
capital a, circumflex accent
|
Â
|
Â
|
Ã
|
capital a, tilde
|
Ã
|
Ã
|
Ä
|
capital a, umlaut mark
|
Ä
|
Ä
|
Å
|
capital a, ring
|
Å
|
Å
|
Æ
|
capital ae
|
Æ
|
Æ
|
Ç
|
capital c, cedilla
|
Ç
|
Ç
|
è
|
capital e, grave accent
|
È
|
È
|
é
|
capital e, acute accent
|
É
|
É
|
ê
|
capital e, circumflex accent
|
Ê
|
Ê
|
Ë
|
capital e, umlaut mark
|
Ë
|
Ë
|
ì
|
capital i, grave accent
|
Ì
|
Ì
|
í
|
capital i, acute accent
|
Í
|
Í
|
Î
|
capital i, circumflex accent
|
Î
|
Î
|
Ï
|
capital i, umlaut mark
|
Ï
|
Ï
|
D
|
capital eth, Icelandic
|
Ð
|
Ð
|
Ñ
|
capital n, tilde
|
Ñ
|
Ñ
|
ò
|
capital o, grave accent
|
Ò
|
Ò
|
ó
|
capital o, acute accent
|
Ó
|
Ó
|
Ô
|
capital o, circumflex accent
|
Ô
|
Ô
|
Õ
|
capital o, tilde
|
Õ
|
Õ
|
Ö
|
capital o, umlaut mark
|
Ö
|
Ö
|
Ø
|
capital o, slash
|
Ø
|
Ø
|
ù
|
capital u, grave accent
|
Ù
|
Ù
|
ú
|
capital u, acute accent
|
Ú
|
Ú
|
Û
|
capital u, circumflex accent
|
Û
|
Û
|
ü
|
capital u, umlaut mark
|
Ü
|
Ü
|
Y
|
capital y, acute accent
|
Ý
|
Ý
|
T
|
capital THORN, Icelandic
|
Þ
|
Þ
|
ß
|
small sharp s, German
|
ß
|
ß
|
à
|
small a, grave accent
|
à
|
à
|
á
|
small a, acute accent
|
á
|
á
|
a
|
small a, circumflex accent
|
â
|
â
|
ã
|
small a, tilde
|
ã
|
ã
|
ä
|
small a, umlaut mark
|
ä
|
ä
|
å
|
small a, ring
|
å
|
å
|
æ
|
small ae
|
æ
|
æ
|
ç
|
small c, cedilla
|
ç
|
ç
|
è
|
small e, grave accent
|
è
|
è
|
é
|
small e, acute accent
|
é
|
é
|
ê
|
small e, circumflex accent
|
ê
|
ê
|
ë
|
small e, umlaut mark
|
ë
|
ë
|
ì
|
small i, grave accent
|
ì
|
ì
|
í
|
small i, acute accent
|
í
|
í
|
î
|
small i, circumflex accent
|
î
|
î
|
ï
|
small i, umlaut mark
|
ï
|
ï
|
e
|
small eth, Icelandic
|
ð
|
ð
|
ñ
|
small n, tilde
|
ñ
|
ñ
|
ò
|
small o, grave accent
|
ò
|
ò
|
ó
|
small o, acute accent
|
ó
|
ó
|
ô
|
small o, circumflex accent
|
ô
|
ô
|
õ
|
small o, tilde
|
õ
|
õ
|
ö
|
small o, umlaut mark
|
ö
|
ö
|
ø
|
small o, slash
|
ø
|
ø
|
ù
|
small u, grave accent
|
ù
|
ù
|
ú
|
small u, acute accent
|
ú
|
ú
|
û
|
small u, circumflex accent
|
û
|
û
|
ü
|
small u, umlaut mark
|
ü
|
ü
|
y
|
small y, acute accent
|
ý
|
ý
|
t
|
small thorn, Icelandic
|
þ
|
þ
|
ÿ
|
small y, umlaut mark
|
ÿ
|
ÿ
|
显示结果
|
描述
|
实体名称
|
实体编号
|
---|---|---|---|
空格
|
|
||
<
|
小于号
|
<
|
<< p=""><!--
|
>
|
大于号
|
>
|
>
|
&
|
和号
|
&
|
&
|
"
|
引号
|
"
|
"
|
‘
|
撇号
|
' (IE不支持)
|
‘
|
¢
|
分
|
¢
|
¢
|
£
|
镑
|
£
|
£
|
¥
|
人民币
|
¥
|
¥
|