零基础学习WEB前端开发(七):注释及特殊字符
作者:互联网
一、注释的使用
注释,就是添加一些“废话”,为了便于理解和阅读,但是并不在正式内容中显示或执行
语法:<!-- 注释的内容 -->
<!--这是一段注释。注释不会在浏览器中显示。-->
<p>这是一段普通的段落。</p>
可以使用快捷键进行注释:Ctrl + /
二、特殊字符
例如空格,在程序中敲n个空格,都是显示一个空格。但是可以使用特殊字符来实现。下面的表中是常见的字符,在代码中输入实体名称就行,注意不要丢了英文分号。
常用的特殊字符
显示结果 | 描述 | 实体名称 | 实体编号 |
---|---|---|---|
空格 | |   | |
< | 小于号 | < | < |
> | 大于号 | > | > |
& | 和号 | & | & |
" | 引号 | " | " |
' | 撇号 | ' (IE不支持) | ' |
¢ | 分 | ¢ | ¢ |
£ | 镑 | £ | £ |
¥ | 人民币/日元 | ¥ | ¥ |
€ | 欧元 | € | € |
§ | 小节 | § | § |
© | 版权 | © | © |
® | 注册商标 | ® | ® |
™ | 商标 | ™ | ™ |
× | 乘号 | × | × |
÷ | 除号 | ÷ | ÷ |
附表:特殊字符
HTML 支持的数学符号
字符 | 实体编号 | 实体名称 | 描述 |
---|---|---|---|
∀ | ∀ | ∀ | for all |
∂ | ∂ | ∂ | part |
∃ | ∃ | ∃ | exists |
∅ | ∅ | ∅ | empty |
∇ | ∇ | ∇ | nabla |
∈ | ∈ | ∈ | isin |
∉ | ∉ | ∉ | notin |
∋ | ∋ | ∋ | ni |
∏ | ∏ | ∏ | prod |
∑ | ∑ | ∑ | sum |
− | − | − | minus |
∗ | ∗ | ∗ | lowast |
√ | √ | √ | square root |
∝ | ∝ | ∝ | proportional to |
∞ | ∞ | ∞ | infinity |
∠ | ∠ | ∠ | angle |
∧ | ∧ | ∧ | and |
∨ | ∨ | ∨ | or |
∩ | ∩ | ∩ | cap |
∪ | ∪ | ∪ | cup |
∫ | ∫ | ∫ | integral |
∴ | ∴ | ∴ | therefore |
∼ | ∼ | ∼ | similar to |
≅ | ≅ | ≅ | congruent to |
≈ | ≈ | ≈ | almost equal |
≠ | ≠ | ≠ | not equal |
≡ | ≡ | ≡ | equivalent |
≤ | ≤ | ≤ | less or equal |
≥ | ≥ | ≥ | greater or equal |
⊂ | ⊂ | ⊂ | subset of |
⊃ | ⊃ | ⊃ | superset of |
⊄ | ⊄ | ⊄ | not subset of |
⊆ | ⊆ | ⊆ | subset or equal |
⊇ | ⊇ | ⊇ | superset or equal |
⊕ | ⊕ | ⊕ | circled plus |
⊗ | ⊗ | ⊗ | circled times |
⊥ | ⊥ | ⊥ | perpendicular |
⋅ | ⋅ | ⋅ | dot operator |
HTML 支持的希腊字母
字符 | 实体编号 | 实体名称 | 描述 |
---|---|---|---|
Α | Α | Α | Alpha |
Β | Β | Β | Beta |
Γ | Γ | Γ | Gamma |
Δ | Δ | Δ | Delta |
Ε | Ε | Ε | Epsilon |
Ζ | Ζ | Ζ | Zeta |
Η | Η | Η | Eta |
Θ | Θ | Θ | Theta |
Ι | Ι | Ι | Iota |
Κ | Κ | Κ | Kappa |
Λ | Λ | Λ | Lambda |
Μ | Μ | Μ | Mu |
Ν | Ν | Ν | Nu |
Ξ | Ξ | Ξ | Xi |
Ο | Ο | Ο | Omicron |
Π | Π | Π | Pi |
Ρ | Ρ | Ρ | Rho |
undefined | Sigmaf | ||
Σ | Σ | Σ | Sigma |
Τ | Τ | Τ | Tau |
Υ | Υ | Υ | Upsilon |
Φ | Φ | Φ | Phi |
Χ | Χ | Χ | Chi |
Ψ | Ψ | Ψ | Psi |
Ω | Ω | Ω | Omega |
α | α | α | alpha |
β | β | β | beta |
γ | γ | γ | gamma |
δ | δ | δ | delta |
ε | ε | ε | epsilon |
ζ | ζ | ζ | zeta |
η | η | η | eta |
θ | θ | θ | theta |
ι | ι | ι | iota |
κ | κ | κ | kappa |
λ | λ | λ | lambda |
μ | μ | μ | mu |
ν | ν | ν | nu |
ξ | ξ | ξ | xi |
ο | ο | ο | omicron |
π | π | π | pi |
ρ | ρ | ρ | rho |
ς | ς | ς | sigmaf |
σ | σ | σ | sigma |
τ | τ | τ | tau |
υ | υ | υ | upsilon |
φ | φ | φ | phi |
χ | χ | χ | chi |
ψ | ψ | ψ | psi |
ω | ω | ω | omega |
ϑ | ϑ | ϑ | theta symbol |
ϒ | ϒ | ϒ | upsilon symbol |
ϖ | ϖ | ϖ | pi symbol |
html支持的其他字符
字符 | 实体编号 | 实体名称 | 描述 |
---|---|---|---|
Œ | Œ | Œ | capital ligature OE |
œ | œ | œ | small ligature oe |
Š | Š | Š | capital S with caron |
š | š | š | small S with caron |
Ÿ | Ÿ | Ÿ | capital Y with diaeres |
ƒ | ƒ | ƒ | f with hook |
ˆ | ˆ | ˆ | modifier letter circumflex accent |
˜ | ˜ | ˜ | small tilde |
  |   | en space | |
  |   | em space | |
  |   | thin space | |
| ‌ | ‌ | zero width non-joiner |
| ‍ | ‍ | zero width joiner |
| ‎ | ‎ | left-to-right mark |
| ‏ | ‏ | right-to-left mark |
– | – | – | en dash |
— | — | — | em dash |
' | ‘ | ‘ | left single quotation mark |
' | ’ | ’ | right single quotation mark |
‚ | ‚ | ‚ | single low-9 quotation mark |
" | “ | “ | left double quotation mark |
" | ” | ” | right double quotation mark |
„ | „ | „ | double low-9 quotation mark |
† | † | † | dagger |
‡ | ‡ | ‡ | double dagger |
• | • | • | bullet |
… | … | … | horizontal ellipsis |
‰ | ‰ | ‰ | per mille |
′ | ′ | ′ | minutes |
″ | ″ | ″ | seconds |
‹ | ‹ | ‹ | single left angle quotation |
› | › | › | single right angle quotation |
‾ | ‾ | ‾ | overline |
€ | € | € | euro |
™ | ™ or ™ | ™ | trademark |
← | ← | ← | left arrow |
↑ | ↑ | ↑ | up arrow |
→ | → | → | right arrow |
↓ | ↓ | ↓ | down arrow |
↔ | ↔ | ↔ | left right arrow |
↵ | ↵ | ↵ | carriage return arrow |
⌈ | ⌈ | ⌈ | left ceiling |
⌉ | ⌉ | ⌉ | right ceiling |
⌊ | ⌊ | ⌊ | left floor |
⌋ | ⌋ | ⌋ | right floor |
◊ | ◊ | ◊ | lozenge |
♠ | ♠ | ♠ | spade |
♣ | ♣ | ♣ | club |
♥ | ♥ | ♥ | heart |
♦ | ♦ | ♦ | diamond |
标签:WEB,right,mark,&#,arrow,quotation,前端开发,特殊字符,left 来源: https://blog.csdn.net/txr152111/article/details/120924149