yeskery

HTML特殊符号对照表、常用的字符实体

实体字符

一些字符在 HTML 中是预留的,拥有特殊的含义,比如小于号'<'用于定义 HTML 标签的开始。如果我们希望浏览器正确地显示这些字符,我们必须在 HTML 源码中插入字符实体。

字符实体有三部分:一个和号'&'和一个实体名称(或者一个'#' 和一个实体编号),以及一个分号';'。

要在 HTML 文档中显示小于号,我们需要这样写:&lt; 或者'<'最后的效果则是<

使用实体名称而不是实体编号的好处在于,名称相对来说更容易记忆。而这么做的坏处是,并不是所有的浏览器都支持最新的实体名称,然而几乎所有的浏览器对实体编号的支持都很好。

注意:实体对大小写敏感。

常用的字符实体

显示结果 描述 实体名称 实体编码
  空格 &nbsp; &#160;
< 小于号 &lt; &#60;
> 大于号 &gt; &#62;
& 和号 &amp; &#38;
" 引号 &quot; &#34;
' 撇号 &apos;(IE不支持) &#39;

其他常用的字符实体

显示结果 描述 实体名称 实体编码
¢ &cent; &#162;
£ &pound; &#163;
欧元 &euro; &#8364;
¥ 日圆 &yen; &#165;
§ &sect; &#167;
© 版权 &copy; &#169;
® 注册商标 &reg; &#174;
× 乘号 &times; &#215;
÷ 除号 &divide; &#247;
| 竖线 &#124;
· 圆点 &middot; &#183;

ISO 8859-1 符号实体

显示结果 实体名称 实体编码 显示结果 实体名称 实体编码
  &nbsp; &#160; ¡ &iexcl; &#161;
¢ &cent; &#162; £ &pound; &#163;
¤ &curren; &#164; ¥ &yen; &#165;
¦ &brvbar; &#166; § &sect; &#167;
¨ &uml; &#168; © &copy; &#169;
ª &ordf; &#170; « &laquo; &#171;
¬ &not; &#172; ­ &shy; &#173;
® &reg; &#174; ¯ &macr; &#175;
° &deg; &#176; ± &plusmn; &#177;
² &sup2; &#178; ³ &sup3; &#179;
´ &acute; &#180; µ &micro; &#181;
&para; &#182; · &middot; &#183;
¸ &cedil; &#184; ¹ &sup1; &#185;
º &ordm; &#186; » &raquo; &#187;
¼ &frac14; &#188; ½ &frac12; &#189;
¾ &frac34; &#190; ¿ &iquest; &#191;
À &Agrave; &#192; Á &Aacute; &#193;
 &Acirc; &#194; à &Atilde; &#195;
Ä &Auml; &#196; Å &Aring; &#197;
Æ &AElig; &#198; Ç &Ccedil; &#199;
È &Egrave; &#200; É &Eacute; &#201;
Ê &Ecirc; &#202; Ë &Euml; &#203;
Ì &Igrave; &#204; Í &Iacute; &#205;
Î &Icirc; &#206; Ï &Iuml; &#207;
Ð &ETH; &#208; Ñ &Ntilde; &#209;
Ò &Ograve; &#210; Ó &Oacute; &#211;
Ô &Ocirc; &#212; Õ &Otilde; &#213;
Ö &Ouml; &#214; × &times; &#215;
Ø &Oslash; &#216; Ù &Ugrave; &#217;
Ú &Uacute; &#218; Û &Ucirc; &#219;
Ü &Uuml; &#220; Ý &Yacute; &#221;
Þ &THORN; &#222; ß &szlig; &#223;
à &agrave; &#224; á &aacute; &#225;
â &acirc; &#226; ã &atilde; &#227;
ä &auml; &#228; å &aring; &#229;
æ &aelig; &#230; ç &ccedil; &#231;
è &egrave; &#232; é &eacute; &#233;
ê &ecirc; &#234; ë &euml; &#235;
ì &igrave; &#236; í &iacute; &#237;
î &icirc; &#238; ï &iuml; &#239;
ð &eth; &#240; ñ &ntilde; &#241;
ò &ograve; &#242; ó &oacute; &#243;
ô &ocirc; &#244; õ &otilde; &#245;
ö &ouml; &#246; ÷ &divide; &#247;
ø &oslash; &#248; ù &ugrave; &#249;
ú &uacute; &#250; û &ucirc; &#251;
ü &uuml; &#252; ý &yacute; &#253;
þ &thorn; &#254; ÿ &yuml; &#255;

HTML实体符号

HTML 支持的数学符号

显示结果 实体名称 实体编码 显示结果 实体名称 实体编码
&forall; &#8704; &part; &#8706;
&exists; &exists; &#8707; &empty; &#8709;
&nabla; &#8711; &isin; &#8712;
&notin; &#8713; &ni; &#8715;
&prod; &#8719; &sum; &#8721;
&minus; &#8722; &lowast; &#8727;
&radic; &#8730; &prop; &#8733;
&infin; &#8734; &ang; &#8736;
&and; &#8743; &or; &#8744;
&cap; &#8745; &cup; &#8746;
&int; &#8747; &there4; &#8756;
&sim; &#8764; &cong; &#8773;
&asymp; &#8776; &ne; &#8800;
&equiv; &#8801; &le; &#8804;
&ge; &#8805; &sub; &#8834;
&sup; &#8835; &nsub; &#8836;
&sube; &#8838; &supe; &#8839;
&oplus; &#8853; &otimes; &#8855;
&perp; &#8869; &sdot; &#8901;

HTML 支持的希腊字母

显示结果 实体名称 实体编码 显示结果 实体名称 实体编码
Α &Alpha; &#913; Β &Beta; &#914;
Γ &Gamma; &#915; Δ &Delta; &#916;
Ε &Epsilon; &#917; Ζ &Zeta; &#918;
Η &Eta; &#919; Θ &Theta; &#920;
Ι &Iota; &#921; Κ &Kappa; &#922;
Λ &Lambda; &#923; Μ &Mu; &#924;
Ν &Nu; &#925; Ξ &Xi; &#926;
Ο &Omicron; &#927; Π &Pi; &#928;
Ρ &Rho; &#929; Σ &Sigma; &#931;
Τ &Tau; &#932; Υ &Upsilon; &#933;
Φ &Phi; &#934; Χ &Chi; &#935;
Ψ &Psi; &#936; Ω &Omega; &#937;
α &alpha; &#945; β &beta; &#946;
γ &gamma; &#947; δ &delta; &#948;
ε &epsilon; &#949; ζ &zeta; &#950;
η &eta; &#951; θ &theta; &#952;
ι &iota; &#953; κ &kappa; &#954;
λ &lambda; &#955; μ &mu; &#956;
ν &nu; &#957; ξ &xi; &#958;
ο &omicron; &#959; π &pi; &#960;
ρ &rho; &#961; ς &sigmaf; &#962;
σ &sigma; &#963; τ &tau; &#964;
υ &upsilon; &#965; φ &phi; &#966;
χ &chi; &#967; ψ &psi; &#968;
ω &omega; &#969; ϑ &thetasym; &#977;
ϒ &upsih; &#978; ϖ &piv; &#982;

HTML 支持的其他实体

显示结果 实体名称 实体编码 显示结果 实体名称 实体编码
Œ &OElig; &#338; œ &oelig; &#339;
Š &Scaron; &#352; š &scaron; &#353;
Ÿ &Yuml; &#376; ƒ &fnof; &#402;
ˆ &circ; &#710; ˜ &tilde; &#732;
&ensp; &#8194; &emsp; &#8195;
&thinsp; &#8201; &zwnj; &#8204;
&zwj; &#8205; &lrm; &#8206;
&rlm; &#8207; &ndash; &#8211;
&mdash; &#8212; &lsquo; &#8216;
&rsquo; &#8217; &sbquo; &#8218;
&ldquo; &#8220; &rdquo; &#8221;
&bdquo; &#8222; &dagger; &#8224;
&Dagger; &#8225 &bull; &#8226;
&hellip; &#8230; &permil; &#8240;
&prime; &#8242; &Prime; &#8243;
&lsaquo; &#8249; &rsaquo; &#8250;
&oline; &#8254; &euro; &#8364;
&trade; &#8482; &larr; &#8592;
&uarr; &#8593; &rarr; &#8594;
&darr; &#8595; &harr; &#8596;
&crarr; &#8629; &lceil; &#8968;
&rceil; &#8969; &lfloor; &#8970;
&rfloor; &#8971; &loz; &#9674;
&spades; &#9824; &clubs; &#9827;
&hearts; &#9829; &diams; &#9830;

URL 编码

从 %00 到 %8f

ASCII Value URL-encode ASCII Value URL-encode ASCII Value URL-encode
æ %00 0 %30 ` %60
%01 1 %31 a %61
%02 2 %32 b %62
%03 3 %33 c %63
%04 4 %34 d %64
%05 5 %35 e %65
%06 6 %36 f %66
%07 7 %37 g %67
backspace %08 8 %38 h %68
tab %09 9 %39 i %69
linefeed %0a : %3a j %6a
%0b ; %3b k %6b
%0c < %3c l %6c
c return %0d = %3d m %6d
%0e > %3e n %6e
%0f ? %3f o %6f
%10 @ %40 p %70
%11 A %41 q %71
%12 B %42 r %72
%13 C %43 s %73
%14 D %44 t %74
%15 E %45 u %75
%16 F %46 v %76
%17 G %47 w %77
%18 H %48 x %78
%19 I %49 y %79
%1a J %4a z %7a
%1b K %4b { %7b
%1c L %4c | %7c
%1d M %4d } %7d
%1e N %4e ~ %7e
%1f O %4f %7f
space %20 P %50 %80
! %21 Q %51 %81
%22 R %52 %82
# %23 S %53 ƒ %83
$ %24 T %54 %84
% %25 U %55 %85
& %26 V %56 %86
%27 W %57 %87
( %28 X %56 ˆ %88
) %29 Y %59 %89
* %2a Z %5a Š %8a
+ %2b [ %5b %8b
, %2c \ %5c Π%8c
- %2d ] %5d %8d
. %2e ^ %5e Ž %8e
/ %2f _ %5f %8f

从 %90 到 %ff

ASCII Value URL-encode ASCII Value URL-encode ASCII Value URL-encode
%90 À %c0 ð %f0
%91 Á %c1 ñ %f1
%92 Â %c2 ò %f2
%9r à %c3 ó %f3
%94 Ä %c4 ô %f4
%95 Å %c5 õ %f5
%96 Æ %c6 ö %f6
%97 Ç %c7 ÷ %f7
˜ %98 È %c8 ø %f8
%99 É %c9 ù %f9
š %9a Ê %ca ú %fa
%9b Ë %cb û %fb
œ %9c Ì %cc ü %fc
%9d Í %cd ý %fd
ž %9e Î %ce þ %fe
Ÿ %9f Ï %cf ÿ %ff
%a0 Ð %d0
¡ %a1 Ñ %d1
¢ %a2 Ò %d2
£ %a3 Ó %d3
%a4 Ô %d4
¥ %a5 Õ %d5
| %a6 Ö %d6
§ %a7 %d7
¨ %a8 Ø %d8
© %a9 Ù %d9
ª %aa Ú %da
« %ab Û %db
¬ %ac Ü %dc
¯ %ad Ý %dd
® %ae Þ %de
¯ %af ß %df
° %b0 à %e0
± %b1 á %e1
² %b2 â %e2
³ %b3 ã %e3
´ %b4 ä %e4
µ %b5 å %e5
%b6 æ %e6
· %b7 ç %e7
¸ %b8 è %e8
¹ %b9 é %e9
º %ba ê %ea
» %bb ë %eb
¼ %bc ì %ec
½ %bd í %ed
¾ %be î %ee
¿ %bf ï %ef  

本文部分内容来自:

  1. https://baike.baidu.com/item/HTML%E5%AE%9E%E4%BD%93/9172201
  2. https://www.cnblogs.com/xyyt/p/3515397.html

评论

发表评论 点击刷新验证码

提示

该功能暂未开放