热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

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

适当使用实体,对页面开发有相当大的帮助。自己收集的一些常用的以实体代替与HTML语法相同的字符,避免浏览解析错误。常用HTML字符实体(建议使用实体):字符

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

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

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

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

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

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

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

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

带有实体名称的 ASCII 实体

结果 描述 实体名称 实体编号
" quotation mark " "
' apostrophe  ' &#39;
& ampersand & &
< less-than < <
> greater-than > >

ISO 8859-1 符号实体

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

ISO 8859-1 字符实体

结果 描述 实体名称 实体编号
À capital a, grave accent À &#192;
Á capital a, acute accent Á &#193;
 capital a, circumflex accent  &#194;
à capital a, tilde à &#195;
Ä capital a, umlaut mark Ä &#196;
Å capital a, ring Å &#197;
Æ capital ae Æ &#198;
Ç capital c, cedilla Ç &#199;
È capital e, grave accent È &#200;
É capital e, acute accent É &#201;
Ê capital e, circumflex accent Ê &#202;
Ë capital e, umlaut mark Ë &#203;
Ì capital i, grave accent Ì &#204;
Í capital i, acute accent Í &#205;
Î capital i, circumflex accent Î &#206;
Ï capital i, umlaut mark Ï &#207;
Ð capital eth, Icelandic Ð &#208;
Ñ capital n, tilde Ñ &#209;
Ò capital o, grave accent Ò &#210;
Ó capital o, acute accent Ó &#211;
Ô capital o, circumflex accent Ô &#212;
Õ capital o, tilde Õ &#213;
Ö capital o, umlaut mark Ö &#214;
Ø capital o, slash Ø &#216;
Ù capital u, grave accent Ù &#217;
Ú capital u, acute accent Ú &#218;
Û capital u, circumflex accent Û &#219;
Ü capital u, umlaut mark Ü &#220;
Ý capital y, acute accent Ý &#221;
Þ capital THORN, Icelandic Þ &#222;
ß small sharp s, German ß &#223;
à small a, grave accent à &#224;
á small a, acute accent á &#225;
â small a, circumflex accent â &#226;
ã small a, tilde ã &#227;
ä small a, umlaut mark ä &#228;
å small a, ring å &#229;
æ small ae æ &#230;
ç small c, cedilla ç &#231;
è small e, grave accent è &#232;
é small e, acute accent é &#233;
ê small e, circumflex accent ê &#234;
ë small e, umlaut mark ë &#235;
ì small i, grave accent ì &#236;
í small i, acute accent í &#237;
î small i, circumflex accent î &#238;
ï small i, umlaut mark ï &#239;
ð small eth, Icelandic ð &#240;
ñ small n, tilde ñ &#241;
ò small o, grave accent ò &#242;
ó small o, acute accent ó &#243;
ô small o, circumflex accent ô &#244;
õ small o, tilde õ &#245;
ö small o, umlaut mark ö &#246;
ø small o, slash ø &#248;
ù small u, grave accent ù &#249;
ú small u, acute accent ú &#250;
û small u, circumflex accent û &#251;
ü small u, umlaut mark ü &#252;
ý small y, acute accent ý &#253;
þ small thorn, Icelandic þ &#254;
ÿ small y, umlaut mark ÿ &#255;

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

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

HTML 支持的数学符号

结果 描述 实体名称 实体编号
for all &#8704;
part &#8706;
exists &exists; &#8707;
empty &#8709;
nabla &#8711;
isin &#8712;
notin &#8713;
ni &#8715;
prod &#8719;
sum &#8721;
minus &#8722;
lowast &#8727;
square root &#8730;
proportional to &#8733;
infinity &#8734;
angle &#8736;
and &#8743;
or &#8744;
cap &#8745;
cup &#8746;
integral &#8747;
therefore &#8756;
simular to &#8764;
approximately equal &#8773;
almost equal &#8776;
not equal &#8800;
equivalent &#8801;
less or equal &#8804;
greater or equal &#8805;
subset of &#8834;
superset of &#8835;
not subset of &#8836;
subset or equal &#8838;
superset or equal &#8839;
circled plus &#8853;
cirled times &#8855;
perpendicular &#8869;
dot operator &#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;
  Sigmaf   undefined
Σ 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 λ &#923;
μ mu μ &#956;
ν nu ν &#925;
ξ xi ξ &#958;
ο omicron ο &#959;
π pi π &#960;
ρ rho ρ &#961;
ς sigmaf ς &#962;
σ sigma σ &#963;
τ tau τ &#964;
υ upsilon υ &#965;
φ phi φ &#966;
χ chi χ &#967;
ψ psi ψ &#968;
ω omega ω &#969;
       
ϑ theta symbol ϑ &#977;
ϒ upsilon symbol ϒ &#978;
ϖ pi symbol ϖ &#982;

HTML 支持的其他实体

结果 描述 实体名称 实体编号
Πcapital ligature OE Π&#338;
œ small ligature oe œ &#339;
Š capital S with caron Š &#352;
š small S with caron š &#353;
Ÿ capital Y with diaeres Ÿ &#376;
ƒ f with hook ƒ &#402;
ˆ modifier letter circumflex accent ˆ &#710;
˜ small tilde ˜ &#732;
en space &#8194;
em space &#8195;
thin space &#8201;
zero width non-joiner &#8204;
zero width joiner &#8205;
left-to-right mark &#8206;
right-to-left mark &#8207;
en dash &#8211;
em dash &#8212;
left single quotation mark &#8216;
right single quotation mark &#8217;
single low-9 quotation mark &#8218;
left double quotation mark &#8220;
right double quotation mark &#8221;
double low-9 quotation mark &#8222;
dagger &#8224;
double dagger &#8225;
bullet &#8226;
horizontal ellipsis &#8230;
per mille  &#8240;
minutes &#8242;
seconds &#8243;
single left angle quotation &#8249;
single right angle quotation &#8250;
overline &#8254;
euro &#8364;
trademark &#8482;
left arrow &#8592;
up arrow &#8593;
right arrow &#8594;
down arrow &#8595;
left right arrow &#8596;
carriage return arrow &#8629;
left ceiling &#8968;
right ceiling &#8969;
left floor &#8970;
right floor &#8971;
lozenge &#9674;
spade &#9824;
club &#9827;
heart &#9829;
diamond &#9830;

下面是用 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    

推荐阅读
author-avatar
喝咖啡的小南瓜_488
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有