HTML中的特殊字符

时间:2022-04-27 08:48:34

最近在编写WEB程序的时候,发现HTML有许多内定的特殊字符。例如" "就是表示非断行空白,其实就是空字符串。

常用的特殊字符有:

HTML 原代码 显示结果 描述
&lt; < 小于号或显示标记
&gt; > 大于号或显示标记
&amp; & 可用于显示其它特殊字符
&quot; " 引号
&reg; &reg; 已注册
&copy; &copy; 版权
&trade; ™ 商标
&ensp;   半个空白位
&emsp;   一个空白位
&nbsp; 不断行的空白  

 

全部特殊字符为:

Character
字符
Decimal code
十进制编码
Named entity
已命名实体
Character
字符
Decimal code
十进制编码
Named entity
已命名实体
--- --- --- ---
--- --- --- ---
--- --- --- ---
--- --- --- ---
--- --- --- ---
--- --- --- ---
--- --- --- ---
--- --- --- ---
--- --- --- ---
--- --- --- ---
--- --- --- ---
--- --- --- ---
--- --- --- ---
--- --- --- ---
--- --- --- ---
--- --- --- ---
--- ! ! ---
" " &quot; # # ---
$ $ --- % % ---
& & &amp; ' ' ---
( ( --- ) ) ---
* * --- + + ---
, , --- - - ---
. . --- / / ---
0 0 --- 1 1 ---
2 2 --- 3 3 ---
4 4 --- 5 5 ---
6 6 --- 7 7 ---
8 8 --- 9 9 ---
: : --- ; ; ---
< < &lt; = = ---
> > &gt; ? ? ---
@ @ --- A A ---
B B --- C C ---
D D --- E E ---
F F --- G G ---
H H --- I I ---
J J --- K K ---
L L --- M M ---
N N --- O O ---
P P --- Q Q ---
R R --- S S ---
T T --- U U ---
V V --- W W ---
X X --- Y Y ---
Z Z --- [ [ ---
\ \ --- ] ] ---
^ ^ --- _ _ ---
` ` --- a a ---
b b --- c c ---
d d --- e e ---
f f --- g g ---
h h --- i i ---
j j --- k k ---
l l --- m m ---
n n --- o o ---
p p --- q q ---
r r --- s s ---
t t --- u u ---
v v --- w w ---
x x --- y y ---
z z --- { { ---
| | --- } } ---
~ ~ --- ---  ---
    &nbsp; ¡ ¡ &iexcl;
¢ ¢ &cent; £ £ &pound;
¤ ¤ &curren; ¥ ¥ &yen;
¦ ¦ &brvbar; or &brkbar; § § &sect;
¨ ¨ &uml; or &die; © © &copy;
ª ª &ordf; « « &laquo;
¬ ¬ &not ­ ­ &shy;
® ® &reg; ¯ ¯ &macr; or &hibar;
° ° &deg; ± ± &plusmn;
² ² &sup2; ³ ³ &sup3;
´ ´ &acute; µ µ &micro;
&para; · · &middot;
¸ ¸ &cedil; ¹ ¹ &sup1;
º º &ordm; » » &raquo;
¼ ¼ &frac14; ½ ½ &frac12;
¾ ¾ &frac34; ¿ ¿ &iquest;
À À &Agrave; Á Á &Aacute;
  &Acirc; à à &Atilde;
Ä Ä &Auml; Å Å &Aring;
Æ Æ &AElig; Ç Ç &Ccedil;
È È &Egrave; É É &Eacute;
Ê Ê &Ecirc; Ë Ë &Euml;
Ì Ì &Igrave; Í Í &Iacute;
Î Î &Icirc; Ï Ï &Iuml;
Ð Ð &ETH; Ñ Ñ &Ntilde;
Ò Ò &Ograve; Ó Ó &Oacute;
Ô Ô &Ocirc; Õ Õ &Otilde;
Ö Ö &Ouml; × × &times;
Ø Ø &Oslash; Ù Ù &Ugrave;
Ú Ú &Uacute; Û Û &Ucirc;
Ü Ü &Uuml; Ý Ý &Yacute;
Þ Þ &THORN; ß ß &szlig;
à à &agrave; á á &aacute;
â â &acirc; ã ã &atilde;
ä ä &auml; å å &aring;
æ æ &aelig; ç ç &ccedil;
è è &egrave; é é &eacute;
ê ê &ecirc; ë ë &euml;
ì ì &igrave; í í &iacute;
î î &icirc; ï ï &iuml;
ð ð &eth; ñ ñ &ntilde;
ò ò &ograve; ó ó &oacute;
ô ô &ocirc; õ õ &otilde;
ö ö &ouml; ÷ ÷ &divide;
ø ø &oslash; ù ù &ugrave;
ú ú &uacute; û û &ucirc;
ü ü &uuml; ý ý &yacute;
þ þ &thorn; ÿ ÿ &yuml;
Character
字符
Named entity
已命名实体
Numeric character reference
十进制编码
Description
简介
扩展拉丁字符  Latin Extended-B
ƒ &fnof; ƒ Latin small f with hook, =function, =florin, U0192 ISOtech
希腊字符  Greek
Α &Alpha; Α Greek capital letter alpha, U0391
Β &Beta; Β Greek capital letter beta, U0392
Γ &Gamma; Γ Greek capital letter gamma, U0393 ISOgrk3
Δ &Delta; Δ Greek capital letter delta, U0394 ISOgrk3
Ε &Epsilon; Ε Greek capital letter epsilon, U0395
Ζ &Zeta; Ζ Greek capital letter zeta, U0396
Η &Eta; Η Greek capital letter eta, U0397
Θ &Theta; Θ Greek capital letter theta, U0398 ISOgrk3
Ι &Iota; Ι Greek capital letter iota, U0399
Κ &Kappa; Κ Greek capital letter kappa, U039A
Λ &Lambda; Λ Greek capital letter lambda, U039B ISOgrk3
Μ &Mu; Μ Greek capital letter mu, U039C
Ν &Nu; Ν Greek capital letter nu, U039D
Ξ &Xi; Ξ Greek capital letter xi, U039E ISOgrk3
Ο &Omicron; Ο Greek capital letter omicron, U039F
Π &Pi; Π Greek capital letter pi, U03A0 ISOgrk3
Ρ &Rho; Ρ Greek capital letter rho, U03A1
Σ &Sigma; Σ Greek capital letter sigma, U03A3 ISOgrk3
Τ &Tau; Τ Greek capital letter tau, U03A4
Υ &Upsilon; Υ Greek capital letter upsilon, U03A5 ISOgrk3
Φ &Phi; Φ Greek capital letter phi, U03A6 ISOgrk3
Χ &Chi; Χ Greek capital letter chi, U03A7
Ψ &Psi; Ψ Greek capital letter psi, U03A8 ISOgrk3
Ω &Omega; Ω Greek capital letter omega, U03A9 ISOgrk3
α &alpha; α Greek small letter alpha, U03B1 ISOgrk3
β &beta; β Greek small letter beta, U03B2 ISOgrk3
γ &gamma; γ Greek small letter gamma, U03B3 ISOgrk3
δ &delta; δ Greek small letter delta, U03B4 ISOgrk3
ε &epsilon; ε Greek small letter epsilon, U03B5 ISOgrk3
ζ &zeta; ζ Greek small letter zeta, U03B6 ISOgrk3
η &eta; η Greek small letter eta, U03B7 ISOgrk3
θ &theta; θ Greek small letter theta, U03B8 ISOgrk3
ι &iota; ι Greek small letter iota, U03B9 ISOgrk3
κ &kappa; κ Greek small letter kappa, U03BA ISOgrk3
λ &lambda; λ Greek small letter lambda, U03BB ISOgrk3
μ &mu; μ Greek small letter mu, U03BC ISOgrk3
ν &nu; ν Greek small letter nu, U03BD ISOgrk3
ξ &xi; ξ Greek small letter xi, U03BE ISOgrk3
ο &omicron; ο Greek small letter omicron, U03BF NEW
π &pi; π Greek small letter pi, U03C0 ISOgrk3
ρ &rho; ρ Greek small letter rho, U03C1 ISOgrk3
ς &sigmaf; ς Greek small letter final sigma, U03C2 ISOgrk3
σ &sigma; σ Greek small letter sigma, U03C3 ISOgrk3
τ &tau; τ Greek small letter tau, U03C4 ISOgrk3
υ &upsilon; υ Greek small letter upsilon, U03C5 ISOgrk3
φ &phi; φ Greek small letter phi, U03C6 ISOgrk3
χ &chi; χ Greek small letter chi, U03C7 ISOgrk3
ψ &psi; ψ Greek small letter psi, U03C8 ISOgrk3
ω &omega; ω Greek small letter omega, U03C9 ISOgrk3
ϑ &thetasym; ϑ Greek small letter theta symbol, U03D1 NEW
ϒ &upsih; ϒ Greek upsilon with hook symbol, U03D2 NEW
ϖ &piv; ϖ Greek pi symbol, U03D6 ISOgrk3
通用标点符号  General Punctuation
&bull; bullet, =black small circle, U2022 ISOpub
&hellip; horizontal ellipsis, =three dot leader, U2026 ISOpub
&prime; prime, =minutes, =feet, U2032 ISOtech
&Prime; double prime, =seconds, =inches, U2033 ISOtech
&oline; overline, =spacing overscore, U203E NEW
&frasl; fraction slash, U2044 NEW
字符标记  Letterlike Symbols
&weierp; script capital P, =power set, =Weierstrass p, U2118 ISOamso
&image; blackletter capital I, =imaginary part, U2111 ISOamso
&real; blackletter capital R, =real part symbol, U211C ISOamso
&trade; trade mark sign, U2122 ISOnum
&alefsym; alef symbol, =first transfinite cardinal, U2135 NEW
箭头  Arrows
&larr; leftward arrow, U2190 ISOnum
&uarr; upward arrow, U2191 ISOnum
&rarr; rightward arrow, U2192 ISOnum
&darr; downward arrow, U2193 ISOnum
&harr; left right arrow, U2194 ISOamsa
&crarr; downward arrow with corner leftward, =carriage return, U21B5 NEW
&lArr; leftward double arrow, U21D0 ISOtech
&uArr; upward double arrow, U21D1 ISOamsa
&rArr; rightward double arrow, U21D2 ISOtech
&dArr; downward double arrow, U21D3 ISOamsa
&hArr; left right double arrow, U21D4 ISOamsa
数学符号  Mathematical Operators
&forall; for all, U2200 ISOtech
&part; partial differential, U2202 ISOtech
&exist; there exists, U2203 ISOtech
&empty; empty set, =null set, =diameter, U2205 ISOamso
&nabla; nabla, =backward difference, U2207 ISOtech
&isin; element of, U2208 ISOtech
&notin; not an element of, U2209 ISOtech
&ni; contains as member, U220B ISOtech
&prod; n-ary product, =product sign, U220F ISOamsb
&sum; n-ary sumation, U2211 ISOamsb
&minus; minus sign, U2212 ISOtech
&lowast; asterisk operator, U2217 ISOtech
&radic; square root, =radical sign, U221A ISOtech
&prop; proportional to, U221D ISOtech
&infin; infinity, U221E ISOtech
&ang; angle, U2220 ISOamso
&and; logical and, =wedge, U2227 ISOtech
&or; logical or, =vee, U2228 ISOtech
&cap; intersection, =cap, U2229 ISOtech
&cup; union, =cup, U222A ISOtech
&int; integral, U222B ISOtech
&there4; therefore, U2234 ISOtech
&sim; tilde operator, =varies with, =similar to, U223C ISOtech
&cong; approximately equal to, U2245 ISOtech
&asymp; almost equal to, =asymptotic to, U2248 ISOamsr
&ne; not equal to, U2260 ISOtech
&equiv; identical to, U2261 ISOtech
&le; less-than or equal to, U2264 ISOtech
&ge; greater-than or equal to, U2265 ISOtech
&sub; subset of, U2282 ISOtech
&sup; superset of, U2283 ISOtech
&nsub; not a subset of, U2284 ISOamsn
&sube; subset of or equal to, U2286 ISOtech
&supe; superset of or equal to, U2287 ISOtech
&oplus; circled plus, =direct sum, U2295 ISOamsb
&otimes; circled times, =vector product, U2297 ISOamsb
&perp; up tack, =orthogonal to, =perpendicular, U22A5 ISOtech
&sdot; dot operator, U22C5 ISOamsb
其他技术符号  Miscellaneous Technical
&lceil; left ceiling, =apl upstile, U2308, ISOamsc
&rceil; right ceiling, U2309, ISOamsc
&lfloor; left floor, =apl downstile, U230A, ISOamsc
&rfloor; right floor, U230B, ISOamsc
&lang; left-pointing angle bracket, =bra, U2329 ISOtech
&rang; right-pointing angle bracket, =ket, U232A ISOtech
几何图形  Geometric Shapes
&loz; lozenge, U25CA ISOpub
其他标记  Miscellaneous Symbols
&spades; black spade suit, U2660 ISOpub
&clubs; black club suit, =shamrock, U2663 ISOpub
&hearts; black heart suit, =valentine, U2665 ISOpub
&diams; black diamond suit, U2666 ISOpub