HTML 提供了一些显示保留字符的方法。保留字符是为 HTML 保留的字符或基本键盘中不存在的字符。
例如: ‘<‘ 在 HTML 语言中已经被保留。有时这个字符需要显示在网页上,这会在代码中造成歧义。除了这些字符,基本键盘中通常不存在的字符(£、¥、€、©)等。
HTML 提供了一些实体名称和实体编号以使用此符号。实体编号简单易学。一些有用的符号及其实体名称和实体编号如下。
Notation | Symbols | Entity name | Entity Number |
---|---|---|---|
non-breaking space | |||
< | less than | < | < |
® | registered trademark | ® | ® |
© | copyright | © | © |
€ | euro | € | € |
¥ | yen | ¥ | ¥ |
£ | pound | £ | £ |
¢ | cent | ¢ | ¢ |
“ | double quotation mark | " | " |
& | ampersand | & | & |
> | greater than | > | > |
∂ | PARTIAL DIFFERENTIAL | ∂ | ∂< |
∃ | THERE EXISTS | ∃ | ∃ |
∅ | EMPTY SETS | ∅ | ∅ |
∇ | NABLA | ∇ | ∇ |
∈ | ELEMENT OF | ∈ | ∈ |
∉ | NOT AN ELEMENT OF | ∉ | ∉ |
∋ | CONTAINS AS MEMBER | ∋ | 8715 |
∏ | N-ARY PRODUCT | ∏ | ∏ |
∑ | N-ARY SUMMATION | ∑ | ∑ |
Α | Alpha | Α | Α |
Β | Beta | Β | Β |
Γ | Gamma | Γ | Γ |
Δ | delta | Δ | Δ |
Ε | Epsilon | Ε | Ε |
Ζ | Zeta | Ζ | Ζ |
♥ | BLACK HEART SUIT | ♥ | ♥ |
♣ | BLACK CLUB SUIT | ♣ | ♣ |
♠ | BLACK SPADE SUIT | ♠ | ♠ |
↓ | DOWNWARDS ARROW | ↓ | ↓ |
→ | RIGHTWARDS ARROW | → | → |
↑ | UPWARDS ARROW | ↑ | ↑ |
← | LEFTWARDS ARROW | ← | ← |
™ | TRADEMARK | ™ | ™ |
♦ | BLACK DIAMOND SUIT | ♦ | ♦ |
° | degree | ° | ° |
∞ | infinity | ∞ | ∞ |
‰ | per-mille | ‰ | ‰ |
⋅ | multiplication dot | ⋅ | ⋅ |
± | plus-minus | ± | ± |
† | hermitian | † | † |
— | – | — | — |
¬ | – | ¬ | ¬ |
µ | Micro (mu) | µ | µ |
⊥ | falsum | ⊥ | ⊥ |
∥ | parallel | ∥ | ∥ |
例子:
html
HTML Entities
Showing euro €
Showing cent ¢
Showing Copyright ©
Showing BLACK DIAMOND SUIT ♦
Showing TRADEMARK ™
输出
支持的浏览器:
- 谷歌浏览器
- 微软边缘
- 火狐
- 歌剧
- 苹果浏览器