常用特殊符号的HTML代码(HTML字符实体)

时间:2023-03-09 18:08:52
常用特殊符号的HTML代码(HTML字符实体)

适当使用实体,对页面开发有相当大的帮助。

自己收集的一些常用的以实体代替与HTML语法相同的字符,避免浏览解析错误。

常用HTML字符实体(建议使用实体):
字符 名称 实体名 实体数
圆点   %u25CF;
* 星号  
双引号 " "
& &符 & &
< 左尖括号(小于号) &lt; <
> 右尖括号(大于号) &gt; >
  空格 &nbsp;  
  中文全角空格    

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

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

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

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

注释:实体名称对大小写敏感。

带有实体名称的 ASCII 实体

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

ISO 8859-1 符号实体

结果 描述 实体名称 实体编号
  non-breaking space &nbsp;  
¡ inverted exclamation mark &iexcl; ¡
¢ cent &cent; ¢
£ pound &pound; £
¤ currency &curren; ¤
¥ yen &yen; ¥
¦ broken vertical bar &brvbar; ¦
§ section &sect; §
¨ spacing diaeresis &uml; ¨
© copyright &copy; ©
ª feminine ordinal indicator &ordf; ª
« angle quotation mark (left) &laquo; «
¬ negation &not; ¬
  soft hyphen &shy; ­
® registered trademark &reg; ®
¯ spacing macron &macr; ¯
° degree &deg; °
± plus-or-minus  &plusmn; ±
² superscript 2 &sup2; ²
³ superscript 3 &sup3; ³
´ spacing acute &acute; ´
µ micro &micro; µ
paragraph &para;
· middle dot &middot; ·
¸ spacing cedilla &cedil; ¸
¹ superscript 1 &sup1; ¹
º masculine ordinal indicator &ordm; º
» angle quotation mark (right) &raquo; »
¼ fraction 1/4 &frac14; ¼
½ fraction 1/2 &frac12; ½
¾ fraction 3/4 &frac34; ¾
¿ inverted question mark &iquest; ¿
× multiplication &times; ×
÷ division &divide; ÷

ISO 8859-1 字符实体

结果 描述 实体名称 实体编号
À capital a, grave accent &Agrave; À
Á capital a, acute accent &Aacute; Á
 capital a, circumflex accent &Acirc; Â
à capital a, tilde &Atilde; Ã
Ä capital a, umlaut mark &Auml; Ä
Å capital a, ring &Aring; Å
Æ capital ae &AElig; Æ
Ç capital c, cedilla &Ccedil; Ç
È capital e, grave accent &Egrave; È
É capital e, acute accent &Eacute; É
Ê capital e, circumflex accent &Ecirc; Ê
Ë capital e, umlaut mark &Euml; Ë
Ì capital i, grave accent &Igrave; Ì
Í capital i, acute accent &Iacute; Í
Î capital i, circumflex accent &Icirc; Î
Ï capital i, umlaut mark &Iuml; Ï
Ð capital eth, Icelandic &ETH; Ð
Ñ capital n, tilde &Ntilde; Ñ
Ò capital o, grave accent &Ograve; Ò
Ó capital o, acute accent &Oacute; Ó
Ô capital o, circumflex accent &Ocirc; Ô
Õ capital o, tilde &Otilde; Õ
Ö capital o, umlaut mark &Ouml; Ö
Ø capital o, slash &Oslash; Ø
Ù capital u, grave accent &Ugrave; Ù
Ú capital u, acute accent &Uacute; Ú
Û capital u, circumflex accent &Ucirc; Û
Ü capital u, umlaut mark &Uuml; Ü
Ý capital y, acute accent &Yacute; Ý
Þ capital THORN, Icelandic &THORN; Þ
ß small sharp s, German &szlig; ß
à small a, grave accent &agrave; à
á small a, acute accent &aacute; á
â small a, circumflex accent &acirc; â
ã small a, tilde &atilde; ã
ä small a, umlaut mark &auml; ä
å small a, ring &aring; å
æ small ae &aelig; æ
ç small c, cedilla &ccedil; ç
è small e, grave accent &egrave; è
é small e, acute accent &eacute; é
ê small e, circumflex accent &ecirc; ê
ë small e, umlaut mark &euml; ë
ì small i, grave accent &igrave; ì
í small i, acute accent &iacute; í
î small i, circumflex accent &icirc; î
ï small i, umlaut mark &iuml; ï
ð small eth, Icelandic &eth; ð
ñ small n, tilde &ntilde; ñ
ò small o, grave accent &ograve; ò
ó small o, acute accent &oacute; ó
ô small o, circumflex accent &ocirc; ô
õ small o, tilde &otilde; õ
ö small o, umlaut mark &ouml; ö
ø small o, slash &oslash; ø
ù small u, grave accent &ugrave; ù
ú small u, acute accent &uacute; ú
û small u, circumflex accent &ucirc; û
ü small u, umlaut mark &uuml; ü
ý small y, acute accent &yacute; ý
þ small thorn, Icelandic &thorn; þ
ÿ small y, umlaut mark &yuml; ÿ

本字符实体参考手册包括了数学符号、希腊字符、各种箭头记号、科技符号以及形状。

注释:实体名称对大小写敏感。

HTML 支持的数学符号

结果 描述 实体名称 实体编号
for all &forall;
part &part;
exists &exists;
empty &empty;
nabla &nabla;
isin &isin;
notin &notin;
ni &ni;
prod &prod;
sum &sum;
minus &minus;
lowast &lowast;
square root &radic;
proportional to &prop;
infinity &infin;
angle &ang;
and &and;
or &or;
cap &cap;
cup &cup;
integral &int;
therefore &there4;
simular to &sim;
approximately equal &cong;
almost equal &asymp;
not equal &ne;
equivalent &equiv;
less or equal &le;
greater or equal &ge;
subset of &sub;
superset of &sup;
not subset of &nsub;
subset or equal &sube;
superset or equal &supe;
circled plus &oplus;
cirled times &otimes;
perpendicular &perp;
dot operator &sdot;

HTML 支持的希腊字母

结果 描述 实体名称 实体编号
Α Alpha &Alpha; Α
Β Beta &Beta; Β
Γ Gamma &Gamma; Γ
Δ Delta &Delta; Δ
Ε Epsilon &Epsilon; Ε
Ζ Zeta &Zeta; Ζ
Η Eta &Eta; Η
Θ Theta &Theta; Θ
Ι Iota &Iota; Ι
Κ Kappa &Kappa; Κ
Λ Lambda &Lambda; Λ
Μ Mu &Mu; Μ
Ν Nu &Nu; Ν
Ξ Xi &Xi; Ξ
Ο Omicron &Omicron; Ο
Π Pi &Pi; Π
Ρ Rho &Rho; Ρ
  Sigmaf   undefined
Σ Sigma &Sigma; Σ
Τ Tau &Tau; Τ
Υ Upsilon &Upsilon; Υ
Φ Phi &Phi; Φ
Χ Chi &Chi; Χ
Ψ Psi &Psi; Ψ
Ω Omega &Omega; Ω
       
α alpha &alpha; α
β beta &beta; β
γ gamma &gamma; γ
δ delta &delta; δ
ε epsilon &epsilon; ε
ζ zeta &zeta; ζ
η eta &eta; η
θ theta &theta; θ
ι iota &iota; ι
κ kappa &kappa; κ
λ lambda &lambda; Λ
μ mu &mu; μ
ν nu &nu; Ν
ξ xi &xi; ξ
ο omicron &omicron; ο
π pi &pi; π
ρ rho &rho; ρ
ς sigmaf &sigmaf; ς
σ sigma &sigma; σ
τ tau &tau; τ
υ upsilon &upsilon; υ
φ phi &phi; φ
χ chi &chi; χ
ψ psi &psi; ψ
ω omega &omega; ω
       
ϑ theta symbol &thetasym; ϑ
ϒ upsilon symbol &upsih; ϒ
ϖ pi symbol &piv; ϖ

HTML 支持的其他实体

结果 描述 实体名称 实体编号
Œ capital ligature OE &OElig; Œ
œ small ligature oe &oelig; œ
Š capital S with caron &Scaron; Š
š small S with caron &scaron; š
Ÿ capital Y with diaeres &Yuml; Ÿ
ƒ f with hook &fnof; ƒ
ˆ modifier letter circumflex accent &circ; ˆ
˜ small tilde &tilde; ˜
en space &ensp;
em space &emsp;
thin space &thinsp;
zero width non-joiner &zwnj;
zero width joiner &zwj;
left-to-right mark &lrm;
right-to-left mark &rlm;
en dash &ndash;
em dash &mdash;
left single quotation mark &lsquo;
right single quotation mark &rsquo;
single low-9 quotation mark &sbquo;
left double quotation mark &ldquo;
right double quotation mark &rdquo;
double low-9 quotation mark &bdquo;
dagger &dagger;
double dagger &Dagger;
bullet &bull;
horizontal ellipsis &hellip;
per mille  &permil;
minutes &prime;
seconds &Prime;
single left angle quotation &lsaquo;
single right angle quotation &rsaquo;
overline &oline;
euro &euro;
trademark &trade;
left arrow &larr;
up arrow &uarr;
right arrow &rarr;
down arrow &darr;
left right arrow &harr;
carriage return arrow &crarr;
left ceiling &lceil;
right ceiling &rceil;
left floor &lfloor;
right floor &rfloor;
lozenge &loz;
spade &spades;
club &clubs;
heart &hearts;
diamond &diams;

下面是用 URL 编码形式表示的 ASCII 字符(十六进制格式)。

十六进制格式用于在浏览器和插件中显示非标准的字母和字符。

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 %58 ˆ %88
) %29 Y %59 %89
* %2a Z %5a Š %8a
+ %2b [ %5b %8b
, %2c \ %5c Π%8c
- %2d ] %5d   %8d
. %2e ^ %5e Ž %8e
/ %2f _ %5f   %8f

URL 编码 - 从 %90 到 %ff

ASCII Value URL-encode ASCII Value URL-encode ASCII Value URL-encode
  %90 À %c0 ð %f0
%91 Á %c1 ñ %f1
%92 Â %c2 ò %f2
%93 Ã %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