HTML 支持的常用转义字符或实体

HTML 支持的常用转义字符或实体

字符转义

使用 Markdown 语法进行写作的时候,免不了会遇到一些特殊字符处理的问题,以下是一个常用的 HTML 中的转义字符列表,方便查阅。此文与其说是 Markdown 书写进阶参考博文,倒不如直接说 HTML 的查阅文档,啧啧。

(1). 7 比特 可显示的 ASCII 代码

结果描述实体编号
space 
!exclamation mark!
quotation mark"
#number sign#
$dollar sign$
%percent sign%
&ampersand&
apostrophe'
(left parenthesis(
)right parenthesis)
*asterisk*
+plus sign+
,comma,
-hyphen-
.period.
/slash/
0digit 00
1digit 11
2digit 22
3digit 33
4digit 44
5digit 55
6digit 66
7digit 77
8digit 88
9digit 99
:colon:
;semicolon&#59;
<less-than&#60;
=equals-to&#61;
>greater-than&#62;
?question mark&#63;
@at sign&#64;
Auppercase A&#65;
Buppercase B&#66;
Cuppercase C&#67;
Duppercase D&#68;
Euppercase E&#69;
Fuppercase F&#70;
Guppercase G&#71;
Huppercase H&#72;
Iuppercase I&#73;
Juppercase J&#74;
Kuppercase K&#75;
Luppercase L&#76;
Muppercase M&#77;
Nuppercase N&#78;
Ouppercase O&#79;
Puppercase P&#80;
Quppercase Q&#81;
Ruppercase R&#82;
Suppercase S&#83;
Tuppercase T&#84;
Uuppercase U&#85;
Vuppercase V&#86;
Wuppercase W&#87;
Xuppercase X&#88;
Yuppercase Y&#89;
Zuppercase Z&#90;
[left square bracket&#91;
\backslash&#92;
]right square bracket&#93;
^caret&#94;
_underscore&#95;
`grave accent&#96;
alowercase a&#97;
blowercase b&#98;
clowercase c&#99;
dlowercase d&#100;
elowercase e&#101;
flowercase f&#102;
glowercase g&#103;
hlowercase h&#104;
ilowercase i&#105;
jlowercase j&#106;
klowercase k&#107;
llowercase l&#108;
mlowercase m&#109;
nlowercase n&#110;
olowercase o&#111;
plowercase p&#112;
qlowercase q&#113;
rlowercase r&#114;
slowercase s&#115;
tlowercase t&#116;
ulowercase u&#117;
vlowercase v&#118;
wlowercase w&#119;
xlowercase x&#120;
ylowercase y&#121;
zlowercase z&#122;
{left curly brace&#123;
|vertical bar&#124;
}right curly brace&#125;
~tilde&#126;

(2). 7 比特 设备控制 ASCII代码

ASCII设备控制代码最初被设计为用来控制诸如打印机和磁带驱动器之类的硬件设备。在HTML文档中这些代码不会起任何作用。

结果描述实体编号
NULnull character&#00;
SOHstart of header&#01;
STXstart of text&#02;
ETXend of text&#03;
EOTend of transmission&#04;
ENQenquiry&#05;
ACKacknowledge&#06;
BELbell (ring)&#07;
BSbackspace&#08;
HThorizontal tab&#09;
LFline feed&#10;
VTvertical tab&#11;
FFform feed&#12;
CRcarriage return&#13;
SOshift out&#14;
SIshift in&#15;
DLEdata link escape&#16;
DC1device control 1&#17;
DC2device control 2&#18;
DC3device control 3&#19;
DC4device control 4&#20;
NAKnegative acknowledge&#21;
SYNsynchronize&#22;
ETBend transmission block&#23;
CANcancel&#24;
EMend of medium&#25;
SUBsubstitute&#26;
ESCescape&#27;
FSfile separator&#28;
GSgroup separator&#29;
RSrecord separator&#30;
USunit separator&#31;
DELdelete (rubout)&#127;

(3). 带有实体名称的 ASCII 实体

结果描述实体名称实体编号
quotation mark&quot;&#34;
apostrophe &apos;&#39;
&ampersand&amp;&#38;
<less-than&lt;&#60;
>greater-than&gt;&#62;

(4). ISO 8859-1 符号实体

结果描述实体名称实体编号
non-breaking space&nbsp;&#160;
¡inverted exclamation mark&iexcl;&#161;
¢cent&cent;&#162;
£pound&pound;&#163;
¤currency&curren;&#164;
¥yen&yen;&#165;
¦broken vertical bar&brvbar;&#166;
§section&sect;&#167;
¨spacing diaeresis&uml;&#168;
©copyright&copy;&#169;
ªfeminine ordinal indicator&ordf;&#170;
«angle quotation mark (left)&laquo;&#171;
¬negation&not;&#172;
soft hyphen&shy;&#173;
®registered trademark&reg;&#174;
¯spacing macron&macr;&#175;
°degree&deg;&#176;
±plus-or-minus &plusmn;&#177;
²superscript 2&sup2;&#178;
³superscript 3&sup3;&#179;
´spacing acute&acute;&#180;
µmicro&micro;&#181;
paragraph&para;&#182;
·middle dot&middot;&#183;
¸spacing cedilla&cedil;&#184;
¹superscript 1&sup1;&#185;
ºmasculine ordinal indicator&ordm;&#186;
»angle quotation mark (right)&raquo;&#187;
¼fraction 1/4&frac14;&#188;
½fraction 1/2&frac12;&#189;
¾fraction 3/4&frac34;&#190;
¿inverted question mark&iquest;&#191;
×multiplication&times;&#215;
÷division&divide;&#247;

(5). ISO 8859-1 字符实体

结果描述实体名称实体编号
Àcapital a, grave accent&Agrave;&#192;
Ácapital a, acute accent&Aacute;&#193;
Âcapital a, circumflex accent&Acirc;&#194;
Ãcapital a, tilde&Atilde;&#195;
Äcapital a, umlaut mark&Auml;&#196;
Åcapital a, ring&Aring;&#197;
Æcapital ae&AElig;&#198;
Çcapital c, cedilla&Ccedil;&#199;
Ècapital e, grave accent&Egrave;&#200;
Écapital e, acute accent&Eacute;&#201;
Êcapital e, circumflex accent&Ecirc;&#202;
Ëcapital e, umlaut mark&Euml;&#203;
Ìcapital i, grave accent&Igrave;&#204;
Ícapital i, acute accent&Iacute;&#205;
Îcapital i, circumflex accent&Icirc;&#206;
Ïcapital i, umlaut mark&Iuml;&#207;
Ðcapital eth, Icelandic&ETH;&#208;
Ñcapital n, tilde&Ntilde;&#209;
Òcapital o, grave accent&Ograve;&#210;
Ócapital o, acute accent&Oacute;&#211;
Ôcapital o, circumflex accent&Ocirc;&#212;
Õcapital o, tilde&Otilde;&#213;
Öcapital o, umlaut mark&Ouml;&#214;
Øcapital o, slash&Oslash;&#216;
Ùcapital u, grave accent&Ugrave;&#217;
Úcapital u, acute accent&Uacute;&#218;
Ûcapital u, circumflex accent&Ucirc;&#219;
Ücapital u, umlaut mark&Uuml;&#220;
Ýcapital y, acute accent&Yacute;&#221;
Þcapital THORN, Icelandic&THORN;&#222;
ßsmall sharp s, German&szlig;&#223;
àsmall a, grave accent&agrave;&#224;
ásmall a, acute accent&aacute;&#225;
âsmall a, circumflex accent&acirc;&#226;
ãsmall a, tilde&atilde;&#227;
äsmall a, umlaut mark&auml;&#228;
åsmall a, ring&aring;&#229;
æsmall ae&aelig;&#230;
çsmall c, cedilla&ccedil;&#231;
èsmall e, grave accent&egrave;&#232;
ésmall e, acute accent&eacute;&#233;
êsmall e, circumflex accent&ecirc;&#234;
ësmall e, umlaut mark&euml;&#235;
ìsmall i, grave accent&igrave;&#236;
ísmall i, acute accent&iacute;&#237;
îsmall i, circumflex accent&icirc;&#238;
ïsmall i, umlaut mark&iuml;&#239;
ðsmall eth, Icelandic&eth;&#240;
ñsmall n, tilde&ntilde;&#241;
òsmall o, grave accent&ograve;&#242;
ósmall o, acute accent&oacute;&#243;
ôsmall o, circumflex accent&ocirc;&#244;
õsmall o, tilde&otilde;&#245;
ösmall o, umlaut mark&ouml;&#246;
øsmall o, slash&oslash;&#248;
ùsmall u, grave accent&ugrave;&#249;
úsmall u, acute accent&uacute;&#250;
ûsmall u, circumflex accent&ucirc;&#251;
üsmall u, umlaut mark&uuml;&#252;
ýsmall y, acute accent&yacute;&#253;
þsmall thorn, Icelandic&thorn;&#254;
ÿsmall y, umlaut mark&yuml;&#255;

(6). HTML 支持的数学符号

结果描述实体名称实体编号
for all&forall;&#8704;
part&part;&#8706;
exists&exists;&#8707;
empty&empty;&#8709;
nabla&nabla;&#8711;
isin&isin;&#8712;
notin&notin;&#8713;
ni&ni;&#8715;
prod&prod;&#8719;
sum&sum;&#8721;
minus&minus;&#8722;
lowast&lowast;&#8727;
square root&radic;&#8730;
proportional to&prop;&#8733;
infinity&infin;&#8734;
angle&ang;&#8736;
and&and;&#8743;
or&or;&#8744;
cap&cap;&#8745;
cup&cup;&#8746;
integral&int;&#8747;
therefore&there4;&#8756;
simular to&sim;&#8764;
approximately equal&cong;&#8773;
almost equal&asymp;&#8776;
not equal&ne;&#8800;
equivalent&equiv;&#8801;
less or equal&le;&#8804;
greater or equal&ge;&#8805;
subset of&sub;&#8834;
superset of&sup;&#8835;
not subset of&nsub;&#8836;
subset or equal&sube;&#8838;
superset or equal&supe;&#8839;
circled plus&oplus;&#8853;
cirled times&otimes;&#8855;
perpendicular&perp;&#8869;
dot operator&sdot;&#8901;

(7). HTML 支持的希腊字母

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

(8). HTML 支持的其他实体

结果描述实体名称实体编号
Œcapital ligature OE&OElig;&#338;
œsmall ligature oe&oelig;&#339;
Šcapital S with caron&Scaron;&#352;
šsmall S with caron&scaron;&#353;
Ÿcapital Y with diaeres&Yuml;&#376;
ƒf with hook&fnof;&#402;
ˆmodifier letter circumflex accent&circ;&#710;
˜small tilde&tilde;&#732;
en space&ensp;&#8194;
em space&emsp;&#8195;
thin space&thinsp;&#8201;
zero width non-joiner&zwnj;&#8204;
zero width joiner&zwj;&#8205;
left-to-right mark&lrm;&#8206;
right-to-left mark&rlm;&#8207;
en dash&ndash;&#8211;
em dash&mdash;&#8212;
left single quotation mark&lsquo;&#8216;
right single quotation mark&rsquo;&#8217;
single low-9 quotation mark&sbquo;&#8218;
left double quotation mark&ldquo;&#8220;
right double quotation mark&rdquo;&#8221;
double low-9 quotation mark&bdquo;&#8222;
dagger&dagger;&#8224;
double dagger&Dagger;&#8225;
bullet&bull;&#8226;
horizontal ellipsis&hellip;&#8230;
per mille &permil;&#8240;
minutes&prime;&#8242;
seconds&Prime;&#8243;
single left angle quotation&lsaquo;&#8249;
single right angle quotation&rsaquo;&#8250;
overline&oline;&#8254;
euro&euro;&#8364;
trademark&trade;&#8482;
left arrow&larr;&#8592;
up arrow&uarr;&#8593;
right arrow&rarr;&#8594;
down arrow&darr;&#8595;
left right arrow&harr;&#8596;
carriage return arrow&crarr;&#8629;
left ceiling&lceil;&#8968;
right ceiling&rceil;&#8969;
left floor&lfloor;&#8970;
right floor&rfloor;&#8971;
lozenge&loz;&#9674;
spade&spades;&#9824;
club&clubs;&#9827;
heart&hearts;&#9829;
diamond&diams;&#9830;

(9). 其它

还有一个我个人写文章时用到的中文全角字符:

结果描述实体编号
中文全角空白字符&#12288;

(10). 全部 UTF-8 字符集

以上只是 HTML 相关的字符或实体,但是如果以上没有列出我们想要的字符呢?那就通过以下这个 HTML 文件来进行查看吧(可能会比较慢,因为循环了6万多次,可在加载后存储静态网页或者使用解释型脚本语言动态生成 HTML,可作为手边得力的参考文档):

<!DOCTYPE HTML>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title>UTF-8 字符集</title>
    </head>
    <body>
        <script>
            var html = [];
            html.push("<table border='1' cellpadding='5' cellspacing='0' bordercolor='#77a594' style='border-collapse:collapse'>");
            html.push("<tr><td width='40'>符号</td><td width='80'>编码</td><td width='40'>符号</td><td width='80'>编码</td><td width='40'>符号</td><td width='80'>编码</td><td width='40'>符号</td><td width='80'>编码</td></tr>");
            for(var i = 1; i <= 65536; i++){
                if(i % 4 == 1){
                    html.push("<tr>");
                }
                html.push("<td>&#" + i + ";</td><td>&amp;#" + i + ";</td>");
                if(i % 4 == 0){
                    html.push("</tr>");
                }
            }
            document.write(html.join(""));
        </script>
    </body>
</html>

关于

此文只是一篇整合文章,以下是此文引用和参考的官方文章地址:
HTML ASCII 参考手册
HTML ISO-8859-1 参考手册
HTML 4.01 符号实体

发布地址:
简书
CSDN

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值