第七章 body中的实体符号

一、HTML实体

在 HTML 中,某些字符是预留的,预留字符必须被替换为字符实体。在 HTML 中不能使用小于号(<)和大于号(>),这是因为浏览器会误认为它们是标签。

如果希望正确地显示预留字符,我们必须在 HTML 源代码中使用字符实体(character entities)。字符实体类似这样:

&entity_name;
或者
&#entity_number;

二、常用的字符实体

  • 不间断空格 &nbsp;(non-breaking space)
    HTML 中的常用字符实体是不间断空格( )。

浏览器总是会截短 HTML 页面中的空格。如果您在文本中写 10 个空格,在显示该页面之前,浏览器会删除它们中的 9 个。如需在页面中增加空格的数量,您需要使用 &nbsp; 字符实体。

注意:实体名称对大小写敏感!
HTML 中常用的字符实体

显示结果描述实体名称实体编号
 空格 &nbsp; &#160;
<小于号&lt; &#60;
>大于号&gt; &#62;
&和号&amp; &#38;
"引号&quot; &#34;
'撇号&apos; (IE不支持)&#39;
分(cent) &cent; &#162;
£ 镑(pound) &pound; &#163;
¥ 元(yen) &yen; &#165;
欧元(euro) &euro; &#8364;
§ 小节 &sect; &#167;
© 版权(copyright) &copy; &#169;
® 注册商标 &reg; &#174;
商标 &trade; &#8482;
× 乘号 &times; &#215;
÷ 除号 &divide; &#247;


三、HTML ISO-8859-1 字符实体名称编号对照表

推荐使用实体编号,浏览器对实体编号的支持比较好。

HTML 4.01 支持 ISO 8859-1 (Latin-1) 字符集。

ISO-8859-1 的较低部分(从 1 到 127 之间的代码)是最初的 7 比特 ASCII。

ISO-8859-1 的较高部分(从 160 到 255 之间的代码)全都有实体名称。

这些符号中的大多数都可以在不进行实体引用的情况下使用,但是实体名称或实体编号为那些不容易通过键盘键入的符号提供了表达的方法。

再次强调:实体名称对大小写敏感。


3.1 带有实体名称的 ASCII 实体.

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

3.2 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;

## 3.3 ISO 8859-1 字符实体
  <td>capital a, grave accent</td>
  <td>&amp;Agrave;</td>
  <td>&amp;#192;</td>
</tr>
<tr>
  <td>Á</td>
  <td>capital a, acute accent</td>

  <td>&amp;Aacute;</td>
  <td>&amp;#193;</td>
</tr>
<tr>
  <td>Â</td>
  <td>capital a, circumflex accent</td>
  <td>&amp;Acirc;</td>

  <td>&amp;#194;</td>
</tr>
<tr>
  <td>Ã</td>
  <td>capital a, tilde</td>
  <td>&amp;Atilde;</td>
  <td>&amp;#195;</td>

</tr>
<tr>
  <td>Ä</td>
  <td>capital a, umlaut mark</td>
  <td>&amp;Auml;</td>
  <td>&amp;#196;</td>
</tr>

<tr>
  <td>Å</td>
  <td>capital a, ring</td>
  <td>&amp;Aring;</td>
  <td>&amp;#197;</td>
</tr>
<tr>

  <td>Æ</td>
  <td>capital ae</td>
  <td>&amp;AElig;</td>
  <td>&amp;#198;</td>
</tr>
<tr>
  <td>Ç</td>

  <td>capital c, cedilla</td>
  <td>&amp;Ccedil;</td>
  <td>&amp;#199;</td>
</tr>
<tr>
  <td>È</td>
  <td>capital e, grave accent</td>

  <td>&amp;Egrave;</td>
  <td>&amp;#200;</td>
</tr>
<tr>
  <td>É</td>
  <td>capital e, acute accent</td>
  <td>&amp;Eacute;</td>

  <td>&amp;#201;</td>
</tr>
<tr>
  <td>Ê</td>
  <td>capital e, circumflex accent</td>
  <td>&amp;Ecirc;</td>
  <td>&amp;#202;</td>

</tr>
<tr>
  <td>Ë</td>
  <td>capital e, umlaut mark</td>
  <td>&amp;Euml;</td>
  <td>&amp;#203;</td>
</tr>

<tr>
  <td>Ì</td>
  <td>capital i, grave accent</td>
  <td>&amp;Igrave;</td>
  <td>&amp;#204;</td>
</tr>
<tr>

  <td>Í</td>
  <td>capital i, acute accent</td>
  <td>&amp;Iacute;</td>
  <td>&amp;#205;</td>
</tr>
<tr>
  <td>Î</td>

  <td>capital i, circumflex accent</td>
  <td>&amp;Icirc;</td>
  <td>&amp;#206;</td>
</tr>
<tr>
  <td>Ï</td>
  <td>capital i, umlaut mark</td>

  <td>&amp;Iuml;</td>
  <td>&amp;#207;</td>
</tr>
<tr>
  <td>Ð</td>
  <td>capital eth, Icelandic</td>
  <td>&amp;ETH;</td>

  <td>&amp;#208;</td>
</tr>
<tr>
  <td>Ñ</td>
  <td>capital n, tilde</td>
  <td>&amp;Ntilde;</td>
  <td>&amp;#209;</td>

</tr>
<tr>
  <td>Ò</td>
  <td>capital o, grave accent</td>
  <td>&amp;Ograve;</td>
  <td>&amp;#210;</td>
</tr>

<tr>
  <td>Ó</td>
  <td>capital o, acute accent</td>
  <td>&amp;Oacute;</td>
  <td>&amp;#211;</td>
</tr>
<tr>

  <td>Ô</td>
  <td>capital o, circumflex accent</td>
  <td>&amp;Ocirc;</td>
  <td>&amp;#212;</td>
</tr>
<tr>
  <td>Õ</td>

  <td>capital o, tilde</td>
  <td>&amp;Otilde;</td>
  <td>&amp;#213;</td>
</tr>
<tr>
  <td>Ö</td>
  <td>capital o, umlaut mark</td>

  <td>&amp;Ouml;</td>
  <td>&amp;#214;</td>
</tr>
<tr>
  <td>Ø</td>
  <td>capital o, slash</td>
  <td>&amp;Oslash;</td>

  <td>&amp;#216;</td>
</tr>
<tr>
  <td>Ù</td>
  <td>capital u, grave accent</td>
  <td>&amp;Ugrave;</td>
  <td>&amp;#217;</td>

</tr>
<tr>
  <td>Ú</td>
  <td>capital u, acute accent</td>
  <td>&amp;Uacute;</td>
  <td>&amp;#218;</td>
</tr>

<tr>
  <td>Û</td>
  <td>capital u, circumflex accent</td>
  <td>&amp;Ucirc;</td>
  <td>&amp;#219;</td>
</tr>
<tr>

  <td>Ü</td>
  <td>capital u, umlaut mark</td>
  <td>&amp;Uuml;</td>
  <td>&amp;#220;</td>
</tr>
<tr>
  <td>Ý</td>

  <td>capital y, acute accent</td>
  <td>&amp;Yacute;</td>
  <td>&amp;#221;</td>
</tr>
<tr>
  <td>Þ</td>
  <td>capital THORN, Icelandic</td>

  <td>&amp;THORN;</td>
  <td>&amp;#222;</td>
</tr>
<tr>
  <td>ß</td>
  <td>small sharp s, German</td>
  <td>&amp;szlig;</td>

  <td>&amp;#223;</td>
</tr>
<tr>
  <td>à</td>
  <td>small a, grave accent</td>
  <td>&amp;agrave;</td>
  <td>&amp;#224;</td>

</tr>
<tr>
  <td>á</td>
  <td>small a, acute accent</td>
  <td>&amp;aacute;</td>
  <td>&amp;#225;</td>
</tr>

<tr>
  <td>â</td>
  <td>small a, circumflex accent</td>
  <td>&amp;acirc;</td>
  <td>&amp;#226;</td>
</tr>
<tr>

  <td>ã</td>
  <td>small a, tilde</td>
  <td>&amp;atilde;</td>
  <td>&amp;#227;</td>
</tr>
<tr>
  <td>ä</td>

  <td>small a, umlaut mark</td>
  <td>&amp;auml;</td>
  <td>&amp;#228;</td>
</tr>
<tr>
  <td>å</td>
  <td>small a, ring</td>

  <td>&amp;aring;</td>
  <td>&amp;#229;</td>
</tr>
<tr>
  <td>æ</td>
  <td>small ae</td>
  <td>&amp;aelig;</td>

  <td>&amp;#230;</td>
</tr>
<tr>
  <td>ç</td>
  <td>small c, cedilla</td>
  <td>&amp;ccedil;</td>
  <td>&amp;#231;</td>

</tr>
<tr>
  <td>è</td>
  <td>small e, grave accent</td>
  <td>&amp;egrave;</td>
  <td>&amp;#232;</td>
</tr>

<tr>
  <td>é</td>
  <td>small e, acute accent</td>
  <td>&amp;eacute;</td>
  <td>&amp;#233;</td>
</tr>
<tr>

  <td>ê</td>
  <td>small e, circumflex accent</td>
  <td>&amp;ecirc;</td>
  <td>&amp;#234;</td>
</tr>
<tr>
  <td>ë</td>

  <td>small e, umlaut mark</td>
  <td>&amp;euml;</td>
  <td>&amp;#235;</td>
</tr>
<tr>
  <td>ì</td>
  <td>small i, grave accent</td>

  <td>&amp;igrave;</td>
  <td>&amp;#236;</td>
</tr>
<tr>
  <td>í</td>
  <td>small i, acute accent</td>
  <td>&amp;iacute;</td>

  <td>&amp;#237;</td>
</tr>
<tr>
  <td>î</td>
  <td>small i, circumflex accent</td>
  <td>&amp;icirc;</td>
  <td>&amp;#238;</td>

</tr>
<tr>
  <td>ï</td>
  <td>small i, umlaut mark</td>
  <td>&amp;iuml;</td>
  <td>&amp;#239;</td>
</tr>

<tr>
  <td>ð</td>
  <td>small eth, Icelandic</td>
  <td>&amp;eth;</td>
  <td>&amp;#240;</td>
</tr>
<tr>

  <td>ñ</td>
  <td>small n, tilde</td>
  <td>&amp;ntilde;</td>
  <td>&amp;#241;</td>
</tr>
<tr>
  <td>ò</td>

  <td>small o, grave accent</td>
  <td>&amp;ograve;</td>
  <td>&amp;#242;</td>
</tr>
<tr>
  <td>ó</td>
  <td>small o, acute accent</td>

  <td>&amp;oacute;</td>
  <td>&amp;#243;</td>
</tr>
<tr>
  <td>ô</td>
  <td>small o, circumflex accent</td>
  <td>&amp;ocirc;</td>

  <td>&amp;#244;</td>
</tr>
<tr>
  <td>õ</td>
  <td>small o, tilde</td>
  <td>&amp;otilde;</td>
  <td>&amp;#245;</td>

</tr>
<tr>
  <td>ö</td>
  <td>small o, umlaut mark</td>
  <td>&amp;ouml;</td>
  <td>&amp;#246;</td>
</tr>

<tr>
  <td>ø</td>
  <td>small o, slash</td>
  <td>&amp;oslash;</td>
  <td>&amp;#248;</td>
</tr>
<tr>

  <td>ù</td>
  <td>small u, grave accent</td>
  <td>&amp;ugrave;</td>
  <td>&amp;#249;</td>
</tr>
<tr>
  <td>ú</td>

  <td>small u, acute accent</td>
  <td>&amp;uacute;</td>
  <td>&amp;#250;</td>
</tr>
<tr>
  <td>û</td>
  <td>small u, circumflex accent</td>

  <td>&amp;ucirc;</td>
  <td>&amp;#251;</td>
</tr>
<tr>
  <td>ü</td>
  <td>small u, umlaut mark</td>
  <td>&amp;uuml;</td>

  <td>&amp;#252;</td>
</tr>
<tr>
  <td>ý</td>
  <td>small y, acute accent</td>
  <td>&amp;yacute;</td>
  <td>&amp;#253;</td>

</tr>
<tr>
  <td>þ</td>
  <td>small thorn, Icelandic</td>
  <td>&amp;thorn;</td>
  <td>&amp;#254;</td>
</tr>

<tr>
  <td>ÿ</td>
  <td>small y, umlaut mark</td>
  <td>&amp;yuml;</td>
  <td>&amp;#255;</td>
</tr>
结果 描述 实体名称 实体编号
À


# 四、HTML 4.01 符号实体 *本字符实体包括了数学符号、希腊字符、各种箭头记号、科技符号以及形状。* 注释:实体名称对大小写敏感。

4.1 HTML 支持的数学符号

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

## 4.2 HTML 支持的希腊字母
  <td>&amp;#913;</td>
</tr>
<tr>
  <td>Β</td>
  <td>Beta</td>
  <td>&amp;Beta;</td>
  <td>&amp;#914;</td>

</tr>
<tr>
  <td>Γ</td>
  <td>Gamma</td>
  <td>&amp;Gamma;</td>
  <td>&amp;#915;</td>
</tr>

<tr>
  <td>Δ</td>
  <td>Delta</td>
  <td>&amp;Delta;</td>
  <td>&amp;#916;</td>
</tr>
<tr>

  <td>Ε</td>
  <td>Epsilon</td>
  <td>&amp;Epsilon;</td>
  <td>&amp;#917;</td>
</tr>
<tr>
  <td>Ζ</td>

  <td>Zeta</td>
  <td>&amp;Zeta;</td>
  <td>&amp;#918;</td>
</tr>
<tr>
  <td>Η</td>
  <td>Eta</td>

  <td>&amp;Eta;</td>
  <td>&amp;#919;</td>
</tr>
<tr>
  <td>Θ</td>
  <td>Theta</td>
  <td>&amp;Theta;</td>

  <td>&amp;#920;</td>
</tr>
<tr>
  <td>Ι</td>
  <td>Iota</td>
  <td>&amp;Iota;</td>
  <td>&amp;#921;</td>

</tr>
<tr>
  <td>Κ</td>
  <td>Kappa</td>
  <td>&amp;Kappa;</td>
  <td>&amp;#922;</td>
</tr>

<tr>
  <td>Λ</td>
  <td>Lambda</td>
  <td>&amp;Lambda;</td>
  <td>&amp;#923;</td>
</tr>
<tr>

  <td>Μ</td>
  <td>Mu</td>
  <td>&amp;Mu;</td>
  <td>&amp;#924;</td>
</tr>
<tr>
  <td>Ν</td>

  <td>Nu</td>
  <td>&amp;Nu;</td>
  <td>&amp;#925;</td>
</tr>
<tr>
  <td>Ξ</td>
  <td>Xi</td>

  <td>&amp;Xi;</td>
  <td>&amp;#926;</td>
</tr>
<tr>
  <td>Ο</td>
  <td>Omicron</td>
  <td>&amp;Omicron;</td>

  <td>&amp;#927;</td>
</tr>
<tr>
  <td>Π</td>
  <td>Pi</td>
  <td>&amp;Pi;</td>
  <td>&amp;#928;</td>

</tr>
<tr>
  <td>Ρ</td>
  <td>Rho</td>
  <td>&amp;Rho;</td>
  <td>&amp;#929;</td>
</tr>

<tr>
  <td>&nbsp;</td>
  <td>Sigmaf</td>
  <td>&nbsp;</td>
  <td>undefined</td>
</tr>
<tr>
  <td>Σ</td>

  <td>Sigma</td>
  <td>&amp;Sigma;</td>
  <td>&amp;#931;</td>
</tr>
<tr>
  <td>Τ</td>
  <td>Tau</td>

  <td>&amp;Tau;</td>
  <td>&amp;#932;</td>
</tr>
<tr>
  <td>Υ</td>
  <td>Upsilon</td>
  <td>&amp;Upsilon;</td>

  <td>&amp;#933;</td>
</tr>
<tr>
  <td>Φ</td>
  <td>Phi</td>
  <td>&amp;Phi;</td>
  <td>&amp;#934;</td>

</tr>
<tr>
  <td>Χ</td>
  <td>Chi</td>
  <td>&amp;Chi;</td>
  <td>&amp;#935;</td>
</tr>


<tr>
  <td>Ψ</td>
  <td>Psi</td>
  <td>&amp;Psi;</td>
  <td>&amp;#936;</td>
</tr>
<tr>

  <td>Ω</td>
  <td>Omega</td>
  <td>&amp;Omega;</td>
  <td>&amp;#937;</td>
</tr>

<tr>
  <td>&nbsp;</td>

  <td>&nbsp;</td>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
</tr>

<tr>
  <td>α</td>
  <td>alpha</td>
  <td>&amp;alpha;</td>

  <td>&amp;#945;</td>
</tr>
<tr>
  <td>β</td>
  <td>beta</td>
  <td>&amp;beta;</td>
  <td>&amp;#946;</td>

</tr>
<tr>
  <td>γ</td>
  <td>gamma</td>
  <td>&amp;gamma;</td>
  <td>&amp;#947;</td>
</tr>

<tr>
  <td>δ</td>
  <td>delta</td>
  <td>&amp;delta;</td>
  <td>&amp;#948;</td>
</tr>
<tr>

  <td>ε</td>
  <td>epsilon</td>
  <td>&amp;epsilon;</td>
  <td>&amp;#949;</td>
</tr>
<tr>
  <td>ζ</td>

  <td>zeta</td>
  <td>&amp;zeta;</td>
  <td>&amp;#950;</td>
</tr>
<tr>
  <td>η</td>
  <td>eta</td>

  <td>&amp;eta;</td>
  <td>&amp;#951;</td>
</tr>
<tr>
  <td>θ</td>
  <td>theta</td>
  <td>&amp;theta;</td>

  <td>&amp;#952;</td>
</tr>
<tr>
  <td>ι</td>
  <td>iota</td>
  <td>&amp;iota;</td>
  <td>&amp;#953;</td>

</tr>
<tr>
  <td>κ</td>
  <td>kappa</td>
  <td>&amp;kappa;</td>
  <td>&amp;#954;</td>
</tr>

<tr>
  <td>λ</td>
  <td>lambda</td>
  <td>&amp;lambda;</td>
  <td>&amp;#923;</td>
</tr>
<tr>

  <td>μ</td>
  <td>mu</td>
  <td>&amp;mu;</td>
  <td>&amp;#956;</td>
</tr>
<tr>
  <td>ν</td>

  <td>nu</td>
  <td>&amp;nu;</td>
  <td>&amp;#925;</td>
</tr>
<tr>
  <td>ξ</td>
  <td>xi</td>

  <td>&amp;xi;</td>
  <td>&amp;#958;</td>
</tr>
<tr>
  <td>ο</td>
  <td>omicron</td>
  <td>&amp;omicron;</td>

  <td>&amp;#959;</td>
</tr>
<tr>
  <td>π</td>
  <td>pi</td>
  <td>&amp;pi;</td>
  <td>&amp;#960;</td>

</tr>
<tr>
  <td>ρ</td>
  <td>rho</td>
  <td>&amp;rho;</td>
  <td>&amp;#961;</td>
</tr>

<tr>
  <td>ς</td>
  <td>sigmaf</td>
  <td>&amp;sigmaf;</td>
  <td>&amp;#962;</td>
</tr>
<tr>

  <td>σ</td>
  <td>sigma</td>
  <td>&amp;sigma;</td>
  <td>&amp;#963;</td>
</tr>
<tr>
  <td>τ</td>

  <td>tau</td>
  <td>&amp;tau;</td>
  <td>&amp;#964;</td>
</tr>
<tr>
  <td>υ</td>
  <td>upsilon</td>

  <td>&amp;upsilon;</td>
  <td>&amp;#965;</td>
</tr>
<tr>
  <td>φ</td>
  <td>phi</td>
  <td>&amp;phi;</td>

  <td>&amp;#966;</td>
</tr>
<tr>
  <td>χ</td>
  <td>chi</td>
  <td>&amp;chi;</td>
  <td>&amp;#967;</td>

</tr>
<tr>
  <td>ψ</td>
  <td>psi</td>
  <td>&amp;psi;</td>
  <td>&amp;#968;</td>
</tr>

<tr>
  <td>ω</td>
  <td>omega</td>
  <td>&amp;omega;</td>
  <td>&amp;#969;</td>
</tr>
<tr>

  <td>&nbsp;</td>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
  <td>&nbsp;</td>
</tr>
<tr>
  <td>ϑ</td>
  <td>theta symbol</td>

  <td>&amp;thetasym;</td>
  <td>&amp;#977;</td>
</tr>
<tr>
  <td>ϒ</td>
  <td>upsilon symbol</td>
  <td>&amp;upsih;</td>

  <td>&amp;#978;</td>
</tr>
<tr>
  <td>ϖ</td>
  <td>pi symbol</td>
  <td>&amp;piv;</td>
  <td>&amp;#982;</td>

</tr>
结果 描述 实体名称 实体编号
Α Alpha &Alpha;

4.3 HTML 支持的其它实体

  <td>&amp;#338;</td>
</tr>
<tr>
  <td>œ</td>
  <td>small ligature oe</td>
  <td>&amp;oelig;</td>
  <td>&amp;#339;</td>

</tr>
<tr>
  <td>Š</td>
  <td>capital S with caron</td>
  <td>&amp;Scaron;</td>
  <td>&amp;#352;</td>
</tr>

<tr>
  <td>š</td>
  <td>small S with caron</td>
  <td>&amp;scaron;</td>
  <td>&amp;#353;</td>
</tr>
<tr>

  <td>Ÿ</td>
  <td>capital Y with diaeres</td>
  <td>&amp;Yuml;</td>
  <td>&amp;#376;</td>
</tr>
<tr>
  <td>ƒ</td>

  <td>f with hook</td>
  <td>&amp;fnof;</td>
  <td>&amp;#402;</td>
</tr>
<tr>
  <td>ˆ</td>
  <td>modifier letter circumflex accent</td>

  <td>&amp;circ;</td>
  <td>&amp;#710;</td>
</tr>
<tr>
  <td>˜</td>
  <td>small tilde</td>
  <td>&amp;tilde;</td>

  <td>&amp;#732;</td>
</tr>
<tr>
  <td> </td>
  <td>en space</td>
  <td>&amp;ensp;</td>
  <td>&amp;#8194;</td>

</tr>
<tr>
  <td> </td>
  <td>em space</td>
  <td>&amp;emsp;</td>
  <td>&amp;#8195;</td>
</tr>

<tr>
  <td> </td>
  <td>thin space</td>
  <td>&amp;thinsp;</td>
  <td>&amp;#8201;</td>
</tr>
<tr>

  <td>‌</td>
  <td>zero width non-joiner</td>
  <td>&amp;zwnj;</td>
  <td>&amp;#8204;</td>
</tr>
<tr>
  <td>‍</td>

  <td>zero width joiner</td>
  <td>&amp;zwj;</td>
  <td>&amp;#8205;</td>
</tr>
<tr>
  <td>‎</td>
  <td>left-to-right mark</td>

  <td>&amp;lrm;</td>
  <td>&amp;#8206;</td>
</tr>
<tr>
  <td>‏</td>
  <td>right-to-left mark</td>
  <td>&amp;rlm;</td>

  <td>&amp;#8207;</td>
</tr>
<tr>
  <td>–</td>
  <td>en dash</td>
  <td>&amp;ndash;</td>
  <td>&amp;#8211;</td>

</tr>
<tr>
  <td>—</td>
  <td>em dash</td>
  <td>&amp;mdash;</td>
  <td>&amp;#8212;</td>
</tr>

<tr>
  <td>‘</td>
  <td>left single quotation mark</td>
  <td>&amp;lsquo;</td>
  <td>&amp;#8216;</td>
</tr>
<tr>

  <td>’</td>
  <td>right single quotation mark</td>
  <td>&amp;rsquo;</td>
  <td>&amp;#8217;</td>
</tr>
<tr>
  <td>‚</td>

  <td>single low-9 quotation mark</td>
  <td>&amp;sbquo;</td>
  <td>&amp;#8218;</td>
</tr>
<tr>
  <td>“</td>
  <td>left double quotation mark</td>

  <td>&amp;ldquo;</td>
  <td>&amp;#8220;</td>
</tr>
<tr>
  <td>”</td>
  <td>right double quotation mark</td>
  <td>&amp;rdquo;</td>

  <td>&amp;#8221;</td>
</tr>
<tr>
  <td>„</td>
  <td>double low-9 quotation mark</td>
  <td>&amp;bdquo;</td>
  <td>&amp;#8222;</td>

</tr>
<tr>
  <td>†</td>
  <td>dagger</td>
  <td>&amp;dagger;</td>
  <td>&amp;#8224;</td>
</tr>

<tr>
  <td>‡</td>
  <td>double dagger</td>
  <td>&amp;Dagger;</td>
  <td>&amp;#8225;</td>
</tr>
<tr>

  <td>•</td>
  <td>bullet</td>
  <td>&amp;bull;</td>
  <td>&amp;#8226;</td>
</tr>
<tr>
  <td>…</td>

  <td>horizontal ellipsis</td>
  <td>&amp;hellip;</td>
  <td>&amp;#8230;</td>
</tr>
<tr>
  <td>‰</td>
  <td>per mille&nbsp;</td>

  <td>&amp;permil;</td>
  <td>&amp;#8240;</td>
</tr>
<tr>
  <td>′</td>
  <td>minutes</td>
  <td>&amp;prime;</td>

  <td>&amp;#8242;</td>
</tr>
<tr>
  <td>″</td>
  <td>seconds</td>
  <td>&amp;Prime;</td>
  <td>&amp;#8243;</td>

</tr>
<tr>
  <td>‹</td>
  <td>single left angle quotation</td>
  <td>&amp;lsaquo;</td>
  <td>&amp;#8249;</td>
</tr>

<tr>
  <td>›</td>
  <td>single right angle quotation</td>
  <td>&amp;rsaquo;</td>
  <td>&amp;#8250;</td>
</tr>
<tr>

  <td>‾</td>
  <td>overline</td>
  <td>&amp;oline;</td>
  <td>&amp;#8254;</td>
</tr>
<tr>
  <td>€</td>

  <td>euro</td>
  <td>&amp;euro;</td>
  <td>&amp;#8364;</td>
</tr>
<tr>
  <td>™</td>
  <td>trademark</td>

  <td>&amp;trade;</td>
  <td>&amp;#8482;</td>
</tr>
<tr>
  <td>←</td>
  <td>left arrow</td>
  <td>&amp;larr;</td>

  <td>&amp;#8592;</td>
</tr>
<tr>
  <td>↑</td>
  <td>up arrow</td>
  <td>&amp;uarr;</td>
  <td>&amp;#8593;</td>

</tr>
<tr>
  <td>→</td>
  <td>right arrow</td>
  <td>&amp;rarr;</td>
  <td>&amp;#8594;</td>
</tr>

<tr>
  <td>↓</td>
  <td>down arrow</td>
  <td>&amp;darr;</td>
  <td>&amp;#8595;</td>
</tr>
<tr>

  <td>↔</td>
  <td>left right arrow</td>
  <td>&amp;harr;</td>
  <td>&amp;#8596;</td>
</tr>
<tr>
  <td>↵</td>

  <td>carriage return arrow</td>
  <td>&amp;crarr;</td>
  <td>&amp;#8629;</td>
</tr>
  <td>&amp;lceil;</td>
  <td>&amp;#8968;</td>
</tr>
<tr>
  <td>⌉</td>
  <td>right ceiling</td>
  <td>&amp;rceil;</td>

  <td>&amp;#8969;</td>
</tr>
<tr>
  <td>⌊</td>
  <td>left floor</td>
  <td>&amp;lfloor;</td>
  <td>&amp;#8970;</td>

</tr>
<tr>
  <td>⌋</td>
  <td>right floor</td>
  <td>&amp;rfloor;</td>
  <td>&amp;#8971;</td>
</tr>

<tr>
  <td>◊</td>
  <td>lozenge</td>
  <td>&amp;loz;</td>
  <td>&amp;#9674;</td>
</tr>
<tr>

  <td>♠</td>
  <td>spade</td>
  <td>&amp;spades;</td>
  <td>&amp;#9824;</td>
</tr>
<tr>
  <td>♣</td>

  <td>club</td>
  <td>&amp;clubs;</td>
  <td>&amp;#9827;</td>
</tr>
<tr>
  <td>♥</td>
  <td>heart</td>

  <td>&amp;hearts;</td>
  <td>&amp;#9829;</td>
</tr>
<tr>
  <td>♦</td>
  <td>diamond</td>
  <td>&amp;diams;</td>

  <td>&amp;#9830;</td>
</tr>	    
结果 描述 实体名称 实体编号
Œ capital ligature OE &OElig;
left ceiling

# 五、xmp xmp 标签之间的内容不会被当作文档内容解析,而会被用等宽字体直接呈现。HTML2 规范建议,本标签中的内容应该具有足够容纳每行80个字母的宽度。

如果嫌实体符号麻烦,可以暂时使用<xmp>

5.1 用法

<xmp></xmp>将HTML代码包裹起来。

<xmp>HTML Code</xmp>

示例

&lt;meta&gt;、&lt;img&gt;、&lt;hr&gt;

<xmp><meta>、<img>、<hr></xmp>

Pass: 已过时,请酌情慎用。


本文参考自W3C手册
posted @ 2020-03-14 15:05  langkye  阅读(179)  评论(0编辑  收藏  举报