HTML字符实体(Character Entities)
有些字符在HTML里有特别的含义,比如小于号<就表示HTML Tag的开始,这个小于号是不显示在我们最终看到的网页里的。那如果我们希望在网页中显示一个小于号,该怎么办呢? 这就要说到HTML字符实体(HTML Character Entities)了。 一个字符实体(Character Entity)分成三部分:第一部分是一个&符号,英文叫ampersand;第二部分是实体(Entity)名字或者是#加上实体(Entity)编号;第三部分是一个分号。 比如,要显示小于号,就可以写<或者&#;。 用实体(Entity)名字的好处是比较好理解,一看lt,大概就猜出是less than的意思,但是其劣势在于并不是所有的浏览器都支持最新的Entity名字。而实体(Entity)编号,各种浏览器都能处理。 注意:Entity是区分大小写的。 如何显示空格
通常情况下,HTML会自动截去多余的空格。不管你加多少空格,都被看做一个空格。比如你在两个字之间加了10个空格,HTML会截去9个空格,只保留一个。为了在网页中增加空格,你可以使用 表示空格。 最常用的字符实体(Character Entities) 显示结果 说明 Entity Name Entity Number
显示一个空格 &#;
< 小于 < &#;
> 大于 > &#;
& &符号 & &#;
" 双引号 " " 其他常用的字符实体(Character Entities)
显示结果 说明 Entity Name Entity Number
? 版权 © &#;
? 注册商标 ® &#;
× 乘号 × &#;
÷ 除号 ÷ &#; ISO Latin-1字符集: 字符
十进制字符编号 实体名字 说明
--- &#; --- 未使用Unused
--- &#; --- 未使用Unused
--- &#; --- 未使用Unused
--- &#; --- 未使用Unused
--- &#; --- 未使用Unused
--- &#; --- 未使用Unused
--- &#; --- 未使用Unused
--- &#; --- 未使用Unused
--- &#; --- 未使用Unused
--- &#; --- 制表符Horizontal tab
--- &#; --- 换行Line feed
--- &#; --- 未使用Unused
--- &#; --- 未使用Unused
--- &#; --- 回车Carriage Return
--- &#; --- 未使用Unused
--- &#; --- 未使用Unused
--- &#; --- 未使用Unused
--- &#; --- 未使用Unused
--- &#; --- 未使用Unused
--- &#; --- 未使用Unused
--- &#; --- 未使用Unused
--- &#; --- 未使用Unused
--- &#; --- 未使用Unused
--- &#; --- 未使用Unused
--- &#; --- 未使用Unused
--- &#; --- 未使用Unused
--- &#; --- 未使用Unused
--- &#; --- 未使用Unused
--- &#; --- 未使用Unused
--- &#; --- 未使用Unused
--- &#; --- 未使用Unused
--- &#; --- 未使用Unused
&#; --- Space
! &#; --- 惊叹号Exclamation mark
" " " 双引号Quotation mark
# &#; --- 数字标志Number sign
$ &#; --- 美元标志Dollar sign
% &#; --- 百分号Percent sign
& &#; & Ampersand
" ' --- 单引号Apostrophe
( &#; --- 小括号左边部分Left parenthesis
) &#; --- 小括号右边部分Right parenthesis
* &#; --- 星号Asterisk
+ &#; --- 加号Plus sign
, &#; --- 逗号Comma
- &#; --- 连字号Hyphen
. &#; --- 句号Period (fullstop)
/ &#; --- 斜杠Solidus (slash)
&#; --- 数字0 Digit
&#; --- 数字1 Digit
&#; --- 数字2 Digit
&#; --- 数字3 Digit
&#; --- 数字4 Digit
&#; --- 数字5 Digit
&#; --- 数字6 Digit
&#; --- 数字7 Digit
&#; --- 数字8 Digit
&#; --- 数字9 Digit
: &#; --- 冒号Colon
; &#; --- 分号Semicolon
< &#; < 小于号Less than
= &#; --- 等于符号Equals sign
> &#; > 大于号Greater than
? &#; --- 问号Question mark
@ &#; --- Commercial at
A &#; --- 大写A Capital A
B &#; --- 大写B Capital B
C &#; --- 大写C Capital C
D &#; --- 大写D Capital D
E &#; --- 大写E Capital E
F &#; --- 大写F Capital F
G &#; --- 大写G Capital G
H &#; --- 大写H Capital H
I &#; --- 大写J Capital I
J &#; --- 大写K Capital J
K &#; --- 大写L Capital K
L &#; --- 大写K Capital L
M &#; --- 大写M Capital M
N &#; --- 大写N Capital N
O &#; --- 大写O Capital O
P &#; --- 大写P Capital P
Q &#; --- 大写Q Capital Q
R &#; --- 大写R Capital R
S &#; --- 大写S Capital S
T &#; --- 大写T Capital T
U &#; --- 大写U Capital U
V &#; --- 大写V Capital V
W &#; --- 大写W Capital W
X &#; --- 大写X Capital X
Y &#; --- 大写Y Capital Y
Z &#; --- 大写Z Capital Z
[ &#; --- 中括号左边部分Left square bracket
\ &#; --- 反斜杠Reverse solidus (backslash)
] &#; --- 中括号右边部分Right square bracket
^ &#; --- Caret
_ &#; --- 下划线Horizontal bar (underscore)
` &#; --- 尖重音符Acute accent
a &#; --- 小写a Small a
b &#; --- 小写b Small b
c &#; --- 小写c Small c
d &#; --- 小写d Small d
e &#; --- 小写e Small e
f &#; --- 小写f Small f
g &#; --- 小写g Small g
h &#; --- 小写h Small h
i &#; --- 小写i Small i
j &#; --- 小写j Small j
k &#; --- 小写k Small k
l &#; --- 小写l Small l
m &#; --- 小写m Small m
n &#; --- 小写n Small n
o &#; --- 小写o Small o
p &#; --- 小写p Small p
q &#; --- 小写q Small q
r &#; --- 小写r Small r
s &#; --- 小写s Small s
t &#; --- 小写t Small t
u &#; --- 小写u Small u
v &#; --- 小写v Small v
w &#; --- 小写w Small w
x &#; --- 小写x Small x
y &#; --- 小写y Small y
z &#; --- 小写z Small z
{ &#; --- 大括号左边部分Left curly brace
| &#; --- 竖线Vertical bar
} &#; --- 大括号右边部分Right curly brace
~ &#; --- Tilde
--- &#; --- 未使用Unused
&#; 空格Nonbreaking space
? &#; ¡ Inverted exclamation
¢ &#; ¢ 货币分标志Cent sign
£ &#; £ 英镑标志Pound sterling
¤ &#; ¤ 通用货币标志General currency sign
¥ &#; ¥ 日元标志Yen sign
| &#; ¦ or &brkbar; 断竖线Broken vertical bar
§ &#; § 分节号Section sign
¨ &#; ¨ or ¨ 变音符号Umlaut
? &#; © 版权标志Copyright
a &#; ª Feminine ordinal
? &#; « Left angle quote, guillemet left
? &#; ¬ Not sign
&#; ­ Soft hyphen
? &#; ® 注册商标标志Registered trademark
ˉ &#; ¯ or &hibar; 长音符号Macron accent
° &#; ° 度数标志Degree sign
± &#; ± 加或减Plus or minus
&#; ² 上标2 Superscript two
&#; ³ 上标3 Superscript three
′ &#; ´ 尖重音符Acute accent
μ &#; µ Micro sign
? &#; ¶ Paragraph sign
· &#; · Middle dot
? &#; ¸ Cedilla
&#; ¹ 上标1 Superscript one
o &#; º Masculine ordinal
? &#; » Right angle quote, guillemet right
? &#; ¼ 四分之一Fraction one-fourth
? &#; ½ 二分之一Fraction one-half
? &#; ¾ 四分之三Fraction three-fourths
? &#; ¿ Inverted question mark
à &#; À Capital A, grave accent
á &#; Á Capital A, acute accent
? &#; Â Capital A, circumflex
? &#; Ã Capital A, tilde
? &#; Ä Capital A, di?esis / umlaut
? &#; Å Capital A, ring
? &#; Æ Capital AE ligature
? &#; Ç Capital C, cedilla
è &#; È Capital E, grave accent
é &#; É Capital E, acute accent
ê &#; Ê Capital E, circumflex
? &#; Ë Capital E, di?esis / umlaut
ì &#; Ì Capital I, grave accent
í &#; Í Capital I, acute accent
? &#; Î Capital I, circumflex
? &#; Ï Capital I, di?esis / umlaut
D &#; Ð Capital Eth, Icelandic
? &#; Ñ Capital N, tilde
ò &#; Ò Capital O, grave accent
ó &#; Ó Capital O, acute accent
? &#; Ô Capital O, circumflex
? &#; Õ Capital O, tilde
? &#; Ö Capital O, di?esis / umlaut
× &#; × 乘号Multiply sign
? &#; Ø Capital O, slash
ù &#; Ù Capital U, grave accent
ú &#; Ú Capital U, acute accent
? &#; Û Capital U, circumflex
ü &#; Ü Capital U, di?esis / umlaut
Y &#; Ý Capital Y, acute accent
T &#; Þ Capital Thorn, Icelandic
? &#; ß Small sharp s, German sz
à &#; à Small a, grave accent
á &#; á Small a, acute accent
a &#; â Small a, circumflex
? &#; ã Small a, tilde
? &#; ä Small a, di?esis / umlaut
? &#; å Small a, ring
? &#; æ Small ae ligature
? &#; ç Small c, cedilla
è &#; è Small e, grave accent
é &#; é Small e, acute accent
ê &#; ê Small e, circumflex
? &#; ë Small e, di?esis / umlaut
ì &#; ì Small i, grave accent
í &#; í Small i, acute accent
? &#; î Small i, circumflex
? &#; ï Small i, di?esis / umlaut
e &#; ð Small eth, Icelandic
? &#; ñ Small n, tilde
ò &#; ò Small o, grave accent
ó &#; ó Small o, acute accent
? &#; ô Small o, circumflex
? &#; õ Small o, tilde
? &#; ö Small o, di?esis / umlaut
÷ &#; ÷ 除号Division sign
? &#; ø Small o, slash
ù &#; ù Small u, grave accent
ú &#; ú Small u, acute accent
? &#; û Small u, circumflex
ü &#; ü Small u, di?esis / umlaut
y &#; ý Small y, acute accent
t &#; þ Small thorn, Icelandic
? &#; ÿ Small y, umlaut symbols, mathematical symbols, and Greek letters ? ƒ Α Α Β Β Γ Γ Δ Δ
Ε Ε Ζ Ζ Η Η Θ Θ Ι Ι
Κ Κ Λ Λ Μ Μ Ν Ν Ξ Ξ
Ο Ο Π Π Ρ Ρ Σ Σ Τ Τ
Υ Υ Φ Φ Χ Χ Ψ Ψ Ω Ω
α α β β γ γ δ δ ε ε
ζ ζ η η θ θ ι ι κ κ
λ λ μ μ ν ν ξ ξ ο ο
π π ρ ρ ? ς σ σ τ τ
υ υ φ φ χ χ ψ ψ ω ω
? ϑ ? ϒ ? ϖ ? • … …
′ ′ ″ ″  ̄ ‾ ? ⁄ ? ℘
? ℑ ? ℜ ? ™ ? ℵ ← ←
↑ ↑ → → ↓ ↓ ? ↔ ? ↵
? ⇐ ? ⇑ ? ⇒ ? ⇓ ? ⇔
? ∀ ? ∂ ? ∃ ? ∅ ? ∇
∈ ∈ ? ∉ ? ∋ ∏ ∏ ∑ ∑
? − ? ∗ √ √ ∝ ∝ ∞ ∞
∠ ∠ ∧ ∧ ∨ ∨ ∩ ∩ ∪ ∪
∫ ∫ ∴ ∴ ~ ∼ ? ≅ ≈ ≈
≠ ≠ ≡ ≡ ≤ ≤ ≥ ≥ ? ⊂
? ⊃ ? ⊄ ? ⊆ ? ⊇ ⊕ ⊕
? ⊗ ⊥ ⊥ ? ⋅ ? ⌈ ? ⌉
? ⌊ ? ⌋ ? ⟨ ? ⟩ ? ◊
? ♠ ? ♣ ? ♥ ? ♦ markup-significant and internationalization characters “ " & & < < > > ? Œ
? œ ? Š ? š ? Ÿ ? ˆ
? ˜ ?   ?   ?   ? ‌
? ‍ ? ‎ ? ‏ – – — —
‘ ‘ ’ ’ ? ‚ “ “ ” ”
? „ ? † ? ‡ ‰ ‰ ? ‹
? › ?/STRONG> €