字符实体(Character Entity),也称为转义字符串(Escape Sequence),主要用于在HTML代码中,输入如“<”和“>”等标签关键字,以及如“©”等在ASCII字符集中没有定义的需要转义的特殊符号。当解释程序遇到此类字符串时,将会解释并在网页中显示为真实的字符。
对于同一个字符实体,可以使用名称和数字两种引用方式。
名称引用方式为&name;,并且严格区分大小写。比如α
代表小写希腊字母“α”;而Α
则代表大写希腊字母“Α”。
数字引用,又可以使用十进制(decimal)和十六进制(hexadecimal)两种格式。十进制引用格式为&#number;。十六进制引用格式为&#xnumber;。例如©
和©
均代表版权符号“©”。
关于字符实体的更多信息,请参考Character Entity Reference。
HTML-Editor插件
我在Christian J Robinson开发的HTML插件的基础之上,制作了HTML-Editor插件,通过快捷键和菜单项来提高编写HTML代码的效率,并提供代码模板、色彩选择和网页预览等功能。
在插入模式下,使用以&开头的快捷键,可以自动输入相对应的字符实体。例如点击&&快捷键,将自动扩展为“&”:
通过在载入插件之前设置g:html_map_entity_leader变量,可以指定其它前缀键:
:let g:html_map_entity_leader = '\'
您也可以在HTML->Character Entities
菜单中选择输入字符实体:
以下表格将列出字符实体的名称和数字代码,以及在HTML-Editor插件中定义的快捷键。请注意:
- 除非在描述中指明HTML5,否则均是在HTML4中的定义;
- 如果快捷键列为空,则说明插件中并没有定义相应的快捷键;
- 如果Entity列为空,则说明该字符并没有名称,而只能使用数字引用格式。
特殊实体
字符 | 描述 | Entity | Decimal | Hex | 快捷键 |
---|---|---|---|---|---|
non-breaking space | |   |   | &<space> | |
" | quotation mark = APL quote | " | " | " | &' |
& | ampersand | & | & | & | && |
< | less-than sign | < | < | < | &< |
> | greater-than sign | > | > | > | &> |
™ | trade mark sign | ™ | ™ | ™ | &tm |
¡ | inverted exclamation mark | ¡ | ¡ | ¡ | &! |
¢ | cent sign | ¢ | ¢ | ¢ | &c| |
£ | pound sign | £ | £ | £ | &# |
¥ | yen sign = yuan sign | ¥ | ¥ | ¥ | &Y= |
€ | euro sign | € | € | € | &E= |
¦ | broken vertical bar | ¦ | ¦ | ¦ | &bb |
§ | section sign | § | § | § | &se |
¨ | diaeresis = spacing diaeresis | ¨ | ¨ | ¨ | &_" |
© | copyright sign | © | © | © | &cO |
® | registered trade mark sign | ® | ® | ® | &rO |
µ | micro sign | µ | µ | µ | &mi |
¶ | pilcrow sign = paragraph sign | ¶ | ¶ | ¶ | &pa |
· | middle dot = Georgian comma | · | · | · | &. |
¿ | inverted/turned question mark | ¿ | ¿ | ¿ | &? |
箭头符号
字符 | 描述 | Entity | Decimal | Hex | 快捷键 |
---|---|---|---|---|---|
← | leftwards single arrow | ← | ← | ← | &la |
↑ | upwards single arrow | ↑ | ↑ | ↑ | &ua |
→ | rightwards single arrow | → | → | → | &ra |
↓ | downwards single arrow | ↓ | ↓ | ↓ | &da |
↔ | left right single arrow | ↔ | ↔ | ↔ | &ha |
↵ | carriage return | ↵ | ↵ | ↵ | &cr |
⇐ | leftwards double arrow | ⇐ | ⇐ | ⇐ | &lA |
⇑ | upwards double arrow | ⇑ | ⇑ | ⇑ | &uA |
⇒ | rightwards double arrow | ⇒ | ⇒ | ⇒ | &rA |
⇓ | downwards double arrow | ⇓ | ⇓ | ⇓ | &dA |
⇔ | left right double arrow | ⇔ | ⇔ | ⇔ | &hA |
标点符号
字符 | 描述 | Entity | Decimal | Hex | 快捷键 |
---|---|---|---|---|---|
– | en dash | – | – | – | &n- |
— | em dash | — | — | — | &m- |
‘ | left single quotation mark | ‘ | ‘ | ‘ | |
’ | right single quotation mark | ’ | ’ | ’ | |
‚ | single low-9 quotation mark | ‚ | ‚ | ‚ | |
“ | left double quotation mark | “ | “ | “ | &ld |
” | right double quotation mark | ” | ” | ” | &rd |
„ | double low-9 quotation mark | „ | „ | „ | |
† | dagger | † | † | † | |
‡ | double dagger | ‡ | ‡ | ‡ | |
‰ | per mille sign | ‰ | ‰ | ‰ | |
‹ | single left angle quotation mark | ‹ | ‹ | ‹ | |
› | single right angle quotation mark | › | › | › | |
• | bullet = black small circle | • | • | • | &* |
… | horizontal ellipsis = three dot leader | … | … | … | &3. |
« | left double angle quotation mark | « | « | « | &2< |
» | right double angle quotation mark | » | » | » | &2> |
′ | prime = minutes = feet | ′ | ′ | ′ | |
″ | double prime = seconds = inches | ″ | ″ | ″ | |
‾ | overline = spacing overscore | ‾ | ‾ | ‾ | |
⁄ | fraction slash | ⁄ | ⁄ | ⁄ |
希腊字母
字符 | 描述 | Entity | Decimal | Hex | 快捷键 |
---|---|---|---|---|---|
Α | Greek capital letter alpha | Α | Α | Α | &Al |
Β | Greek capital letter beta | Β | Β | Β | &Be |
Γ | Greek capital letter gamma | Γ | Γ | Γ | &Ga |
Δ | Greek capital letter delta | Δ | Δ | Δ | &De |
Ε | Greek capital letter epsilon | Ε | Ε | Ε | &Ep |
Ζ | Greek capital letter zeta | Ζ | Ζ | Ζ | &Ze |
Η | Greek capital letter eta | Η | Η | Η | &Et |
Θ | Greek capital letter theta | Θ | Θ | Θ | &Th |
Ι | Greek capital letter iota | Ι | Ι | Ι | &Io |
Κ | Greek capital letter kappa | Κ | Κ | Κ | &Ka |
Λ | Greek capital letter lambda | Λ | Λ | Λ | &Lm |
Μ | Greek capital letter mu | Μ | Μ | Μ | &Mu |
Ν | Greek capital letter nu | Ν | Ν | Ν | &Nu |
Ξ | Greek capital letter xi | Ξ | Ξ | Ξ | &Xi |
Ο | Greek capital letter omicron | Ο | Ο | Ο | &Oc |
Π | Greek capital letter pi | Π | Π | Π | &Pi |
Ρ | Greek capital letter rho | Ρ | Ρ | Ρ | &Rh |
Σ | Greek capital letter sigma | Σ | Σ | Σ | &Si |
Τ | Greek capital letter tau | Τ | Τ | Τ | &Ta |
Υ | Greek capital letter upsilon | Υ | Υ | Υ | &Up |
Φ | Greek capital letter phi | Φ | Φ | Φ | &Ph |
Χ | Greek capital letter chi | Χ | Χ | Χ | &Ch |
Ψ | Greek capital letter psi | Ψ | Ψ | Ψ | &Ps |
Ω | Greek capital letter omega | Ω | Ω | Ω | &Og |
α | Greek small letter alpha | α | α | α | &al |
β | Greek small letter beta | β | β | β | &be |
γ | Greek small letter gamma | γ | γ | γ | &ga |
δ | Greek small letter delta | δ | δ | δ | &de |
ε | Greek small letter epsilon | ε | ε | ε | &ep |
ζ | Greek small letter zeta | ζ | ζ | ζ | &ze |
η | Greek small letter eta | η | η | η | &et |
θ | Greek small letter theta | θ | θ | θ | &th |
ι | Greek small letter iota | ι | ι | ι | &io |
κ | Greek small letter kappa | κ | κ | κ | &ka |
λ | Greek small letter lambda | λ | λ | λ | &lm |
μ | Greek small letter mu | μ | μ | μ | &mu |
ν | Greek small letter nu | ν | ν | ν | &nu |
ξ | Greek small letter xi | ξ | ξ | ξ | &xi |
ο | Greek small letter omicron | ο | ο | ο | &oc |
π | Greek small letter pi | π | π | π | &pi |
ρ | Greek small letter rho | ρ | ρ | ρ | &rh |
ς | Greek small letter final sigma | ς | ς | ς | &sf |
σ | Greek small letter sigma | σ | σ | σ | &si |
τ | Greek small letter tau | τ | τ | τ | &ta |
υ | Greek small letter upsilon | υ | υ | υ | &up |
φ | Greek small letter phi | φ | φ | φ | &ph |
χ | Greek small letter chi | χ | χ | χ | &ch |
ψ | Greek small letter psi | ψ | ψ | ψ | &ps |
ω | Greek small letter omega | ω | ω | ω | &og |
ϑ | Greek small letter theta symbol | ϑ | ϑ | ϑ | &ts |
ϒ | Greek upsilon with hook symbol | ϒ | ϒ | ϒ | &uh |
ϖ | Greek pi symbol | ϖ | ϖ | ϖ | &pv |
拉丁字母
字符 | 描述 | Entity | Decimal | Hex | 快捷键 |
---|---|---|---|---|---|
Š | Latin capital letter S with caron | Š | Š | Š | &Sc |
Ÿ | Latin capital letter Y with diaeresis | Ÿ | Ÿ | Ÿ | &Y" |
À | Latin capital letter A with grave | À | À | À | &A` |
Á | Latin capital letter A with acute | Á | Á | Á | &A' |
 | Latin capital letter A with circumflex |  |  |  | &A^ |
à | Latin capital letter A with tilde | à | à | à | &A~ |
Ä | Latin capital letter A with diaeresis | Ä | Ä | Ä | &A" |
Å | Latin capital letter A with ring above | Å | Å | Å | &Ao |
Æ | Latin capital letter AE | Æ | Æ | Æ | &AE |
Ç | Latin capital letter C with cedilla | Ç | Ç | Ç | &C, |
È | Latin capital letter E with grave | È | È | È | &E` |
É | Latin capital letter E with acute | É | É | É | &E' |
Ê | Latin capital letter E with circumflex | Ê | Ê | Ê | &E^ |
Ë | Latin capital letter E with diaeresis | Ë | Ë | Ë | &E" |
Ì | Latin capital letter I with grave | Ì | Ì | Ì | &I` |
Í | Latin capital letter I with acute | Í | Í | Í | &I' |
Î | Latin capital letter I with circumflex | Î | Î | Î | &I^ |
Ï | Latin capital letter I with diaeresis | Ï | Ï | Ï | &I" |
Ð | Latin capital letter ETH | Ð | Ð | Ð | |
Ñ | Latin capital letter N with tilde | Ñ | Ñ | Ñ | &N~ |
Ò | Latin capital letter O with grave | Ò | Ò | Ò | &O` |
Ó | Latin capital letter O with acute | Ó | Ó | Ó | &O' |
Ô | Latin capital letter O with circumflex | Ô | Ô | Ô | &O^ |
Õ | Latin capital letter O with tilde | Õ | Õ | Õ | &O~ |
Ö | Latin capital letter O with diaeresis | Ö | Ö | Ö | &O" |
Ø | Latin capital letter O with stroke | Ø | Ø | Ø | &O/ |
Ù | Latin capital letter U with grave | Ù | Ù | Ù | &U` |
Ú | Latin capital letter U with acute | Ú | Ú | Ú | &U' |
Û | Latin capital letter U with circumflex | Û | Û | Û | &U^ |
Ü | Latin capital letter U with diaeresis | Ü | Ü | Ü | &U" |
Ý | Latin capital letter Y with acute | Ý | Ý | Ý | &Y' |
Þ | Latin capital letter THORN | Þ | Þ | Þ | |
š | Latin small letter s with caron | š | š | š | &sc |
ß | Latin small letter sharp s = ess-zed | ß | ß | ß | &sz |
à | Latin small letter a with grave | à | à | à | &a` |
á | Latin small letter a with acute | á | á | á | &a' |
â | Latin small letter a with circumflex | â | â | â | &a^ |
ã | Latin small letter a with tilde | ã | ã | ã | &a~ |
ä | Latin small letter a with diaeresis | ä | ä | ä | &a" |
å | Latin small letter a with ring above | å | å | å | &ao |
æ | Latin small letter ae | æ | æ | æ | &ae |
ç | Latin small letter c with cedilla | ç | ç | ç | &c, |
è | Latin small letter e with grave | è | è | è | &e` |
é | Latin small letter e with acute | é | é | é | &e' |
ê | Latin small letter e with circumflex | ê | ê | ê | &e^ |
ë | Latin small letter e with diaeresis | ë | ë | ë | &e" |
ì | Latin small letter i with grave | ì | ì | ì | &i` |
í | Latin small letter i with acute | í | í | í | &i' |
î | Latin small letter i with circumflex | î | î | î | &i^ |
ï | Latin small letter i with diaeresis | ï | ï | ï | &i" |
ð | Latin small letter eth | ð | ð | ð | |
ñ | Latin small letter n with tilde | ñ | ñ | ñ | &n~ |
ò | Latin small letter o with grave | ò | ò | ò | &o` |
ó | Latin small letter o with acute | ó | ó | ó | &o' |
ô | Latin small letter o with circumflex | ô | ô | ô | &o^ |
õ | Latin small letter o with tilde | õ | õ | õ | &o~ |
ö | Latin small letter o with diaeresis | ö | ö | ö | &o" |
ø | Latin small letter o with stroke | ø | ø | ø | &o/ |
ù | Latin small letter u with grave | ù | ù | ù | &u` |
ú | Latin small letter u with acute | ú | ú | ú | &u' |
û | Latin small letter u with circumflex | û | û | û | &u^ |
ü | Latin small letter u with diaeresis | ü | ü | ü | &u" |
ý | Latin small letter y with acute | ý | ý | ý | &y' |
ÿ | Latin small letter y with diaeresis | ÿ | ÿ | ÿ | &y" |
þ | Latin small letter thorn | þ | þ | þ |
罗马数字
字符 | 描述 | Entity | Decimal | Hex | 快捷键 |
---|---|---|---|---|---|
Ⅰ | Roman Numeral One | Ⅰ | Ⅰ | &R1 | |
Ⅱ | Roman Numeral Two | Ⅱ | Ⅱ | &R2 | |
Ⅲ | Roman Numeral Three | Ⅲ | Ⅲ | &R3 | |
Ⅳ | Roman Numeral Four | Ⅳ | Ⅳ | &R4 | |
Ⅴ | Roman Numeral Five | Ⅴ | Ⅴ | &R5 | |
Ⅵ | Roman Numeral Six | Ⅵ | Ⅵ | &R6 | |
Ⅶ | Roman Numeral Seven | Ⅶ | Ⅶ | &R7 | |
Ⅷ | Roman Numeral Eight | Ⅷ | Ⅷ | &R8 | |
Ⅸ | Roman Numeral Nine | Ⅸ | Ⅸ | &R9 | |
Ⅹ | Roman Numeral Ten | Ⅹ | Ⅹ | &R10 | |
Ⅺ | Roman Numeral Eleven | Ⅺ | Ⅺ | &R11 | |
Ⅻ | Roman Numeral Twelve | Ⅻ | Ⅻ | &R12 | |
Ⅼ | Roman Numeral Fifty | Ⅼ | Ⅼ | &R50 | |
Ⅽ | Roman Numeral One Hundred | Ⅽ | Ⅽ | &R100 | |
Ⅾ | Roman Numeral Five Hundred | Ⅾ | Ⅾ | &R500 | |
Ⅿ | Roman Numeral One Thousand | Ⅿ | Ⅿ | &R1000 | |
ⅰ | Small Roman Numeral One | ⅰ | ⅰ | &r1 | |
ⅱ | Small Roman Numeral Two | ⅱ | ⅱ | &r2 | |
ⅲ | Small Roman Numeral Three | ⅲ | ⅲ | &r3 | |
ⅳ | Small Roman Numeral Four | ⅳ | ⅳ | &r4 | |
ⅴ | Small Roman Numeral Five | ⅴ | ⅴ | &r5 | |
ⅵ | Small Roman Numeral Six | ⅵ | ⅵ | &r6 | |
ⅶ | Small Roman Numeral Seven | ⅶ | ⅶ | &r7 | |
ⅷ | Small Roman Numeral Eight | ⅷ | ⅷ | &r8 | |
ⅸ | Small Roman Numeral Nine | ⅸ | ⅸ | &r9 | |
ⅹ | Small Roman Numeral Ten | ⅹ | ⅹ | &r10 | |
ⅺ | Small Roman Numeral Eleven | ⅺ | ⅺ | &r11 | |
ⅻ | Small Roman Numeral Twelve | ⅻ | ⅻ | &r12 | |
ⅼ | Small Roman Numeral Fifty | ⅼ | ⅼ | &r50 | |
ⅽ | Small Roman Numeral One Hundred | ⅽ | ⅽ | &r100 | |
ⅾ | Small Roman Numeral Five Hundred | ⅾ | ⅾ | &r500 | |
ⅿ | Small Roman Numeral OneThousand | ⅿ | ⅿ | &r1000 |
数学符号
字符 | 描述 | Entity | Decimal | Hex | 快捷键 |
---|---|---|---|---|---|
° | degree sign | ° | ° | ° | &dg |
± | plus-minus sign | ± | ± | ± | &+- |
× | multiplication sign | × | × | × | &x |
÷ | division sign | ÷ | ÷ | ÷ | &/ |
∼ | tilde = varies with = similar to | ∼ | ∼ | ∼ | |
≅ | approximately equal to | ≅ | ≅ | ≅ | |
≈ | almost equal to = asymptotic to | ≈ | ≈ | ≈ | |
≠ | not equal to | ≠ | ≠ | ≠ | |
≡ | identical to | ≡ | ≡ | ≡ | |
≤ | less-than or equal to | ≤ | ≤ | ≤ | |
≥ | greater-than or equal to | ≥ | ≥ | ≥ | |
⊂ | subset of | ⊂ | ⊂ | ⊂ | |
⊃ | superset of | ⊃ | ⊃ | ⊃ | |
⊄ | not a subset of | ⊄ | ⊄ | ⊄ | |
⊆ | subset of or equal to | ⊆ | ⊆ | ⊆ | |
⊇ | superset of or equal to | ⊇ | ⊇ | ⊇ | |
⊕ | circled plus = direct sum | ⊕ | ⊕ | ⊕ | |
⊗ | circled times = vector product | ⊗ | ⊗ | ⊗ | |
⊥ | up tack = orthogonal/perpendicular | ⊥ | ⊥ | ⊥ | |
⋅ | dot operator | ⋅ | ⋅ | ⋅ | |
∀ | for all | ∀ | ∀ | ∀ | |
∂ | partial differential | ∂ | ∂ | ∂ | |
∃ | there exists | ∃ | ∃ | ∃ | |
∅ | empty set = null set = diameter | ∅ | ∅ | ∅ | |
∇ | nabla = backward difference | ∇ | ∇ | ∇ | |
∈ | element of | ∈ | ∈ | ∈ | |
∉ | not an element of | ∉ | ∉ | ∉ | |
∋ | contains as member | ∋ | ∋ | ∋ | |
∏ | n-ary product = product sign | ∏ | ∏ | ∏ | |
∑ | n-ary sumation | ∑ | ∑ | ∑ | |
− | minus sign | − | − | − | |
∗ | asterisk operator | ∗ | ∗ | ∗ | |
√ | square root = radical sign | √ | √ | √ | |
∝ | proportional to | ∝ | ∝ | ∝ | |
∞ | infinity | ∞ | ∞ | ∞ | |
∠ | angle | ∠ | ∠ | ∠ | |
∧ | logical and = wedge | ∧ | ∧ | ∧ | |
∨ | logical or = vee | ∨ | ∨ | ∨ | |
∩ | intersection = cap | ∩ | ∩ | ∩ | |
∪ | union = cup | ∪ | ∪ | ∪ | |
∫ | integral | ∫ | ∫ | ∫ | |
∴ | therefore | ∴ | ∴ | ∴ | |
¹ | superscript digit one | ¹ | ¹ | ¹ | &1^ |
² | superscript digit two = squared | ² | ² | ² | &2^ |
³ | superscript digit three = cubed | ³ | ³ | ³ | &3^ |
ƒ | Latin small f with hook = function | ƒ | ƒ | ƒ | &fn |
¼ | vulgar fraction one quarter | ¼ | ¼ | ¼ | &14 |
½ | vulgar fraction one half | ½ | ½ | ½ | &12 |
¾ | vulgar fraction three quarters | ¾ | ¾ | ¾ | &34 |
⅓ | vulgar fraction one third (HTML5) | ⅓ | ⅓ | ⅓ | &13 |
⅔ | vulgar fraction two thirds (HTML5) | ⅔ | ⅔ | ⅔ | &23 |
⅕ | vulgar fraction one fifth (HTML5) | ⅕ | ⅕ | ⅕ | &15 |
⅖ | vulgar fraction two fifths (HTML5) | ⅖ | ⅖ | ⅖ | &25 |
⅗ | vulgar fraction three fifths (HTML5) | ⅗ | ⅗ | ⅗ | &35 |
⅘ | vulgar fraction four fifths (HTML5) | ⅘ | ⅘ | ⅘ | &45 |
⅙ | vulgar fraction one sixth (HTML5) | ⅙ | ⅙ | ⅙ | &16 |
⅚ | vulgar fraction five sixths (HTML5) | ⅚ | ⅚ | ⅚ | &56 |
⅛ | vulgar fraction one eigth (HTML5) | ⅛ | ⅛ | ⅛ | &18 |
⅜ | vulgar fraction three eigths (HTML5) | ⅜ | ⅜ | ⅜ | &38 |
⅝ | vulgar fraction five eigths (HTML5) | ⅝ | ⅝ | ⅝ | &58 |
⅞ | vulgar fraction seven eigths (HTML5) | ⅞ | ⅞ | ⅞ | &78 |
其它符号
字符 | 描述 | Entity | Decimal | Hex | 快捷键 |
---|---|---|---|---|---|
en space |   |   |   | ||
em space |   |   |   | ||
thin space |   |   |   | ||
| zero width non-joiner | ‌ | ‌ | ‌ | |
| zero width joiner | ‍ | ‍ | ‍ | |
| left-to-right mark | ‎ | ‎ | ‎ | |
| right-to-left mark | ‏ | ‏ | ‏ | |
ˆ | modifier letter circumflex accent | ˆ | ˆ | ˆ | |
˜ | small tilde | ˜ | ˜ | ˜ | |
℘ | script capital P = Weierstrass p | ℘ | ℘ | ℘ | |
ℑ | blackletter capital I = imaginary part | ℑ | ℑ | ℑ | |
ℜ | blackletter capital R = real part | ℜ | ℜ | ℜ | |
ℵ | alef symbol = first transfinite cardinal | ℵ | ℵ | ℵ | |
⌈ | left ceiling = APL upstile | ⌈ | ⌈ | ⌈ | |
⌉ | right ceiling | ⌉ | ⌉ | ⌉ | |
⌊ | left floor = APL downstile | ⌊ | ⌊ | ⌊ | |
⌋ | right floor | ⌋ | ⌋ | ⌋ | |
〈 | left-pointing angle bracket = bra | ⟨ | 〈 | 〈 | |
〉 | right-pointing angle bracket = ket | ⟩ | 〉 | 〉 | |
◊ | lozenge | ◊ | ◊ | ◊ | |
♠ | black spade suit | ♠ | ♠ | ♠ | |
♣ | black club suit = shamrock | ♣ | ♣ | ♣ | |
♥ | black heart suit = valentine | ♥ | ♥ | ♥ | |
♦ | black diamond suit | ♦ | ♦ | ♦ |
没有评论:
发表评论