其他分享
首页 > 其他分享> > 零基础学习WEB前端开发(七):注释及特殊字符

零基础学习WEB前端开发(七):注释及特殊字符

作者:互联网

一、注释的使用

注释,就是添加一些“废话”,为了便于理解和阅读,但是并不在正式内容中显示或执行

语法:<!--  注释的内容   -->

<!--这是一段注释。注释不会在浏览器中显示。-->
<p>这是一段普通的段落。</p>

可以使用快捷键进行注释:Ctrl + /

二、特殊字符

例如空格,在程序中敲n个空格,都是显示一个空格。但是可以使用特殊字符来实现。下面的表中是常见的字符,在代码中输入实体名称就行,注意不要丢了英文分号

常用的特殊字符

显示结果描述实体名称实体编号
空格&nbsp;&#160;
<小于号&lt;&#60;
>大于号&gt;&#62;
&和号&amp;&#38;
"引号&quot;&#34;
'撇号 &apos; (IE不支持)&#39;
&cent;&#162;
£&pound;&#163;
¥人民币/日元&yen;&#165;
欧元&euro;&#8364;
§小节&sect;&#167;
©版权&copy;&#169;
®注册商标&reg;&#174;
商标&trade;&#8482;
×乘号&times;&#215;
÷除号&divide;&#247;

附表:特殊字符

HTML 支持的数学符号

字符实体编号实体名称描述
&#8704;&forall;for all
&#8706;&part;part
&#8707;&exist;exists
&#8709;&empty;empty
&#8711;&nabla;nabla
&#8712;&isin;isin
&#8713;&notin;notin
&#8715;&ni;ni
&#8719;&prod;prod
&#8721;&sum;sum
&#8722;&minus;minus
&#8727;&lowast;lowast
&#8730;&radic;square root
&#8733;&prop;proportional to
&#8734;&infin;infinity
&#8736;&ang;angle
&#8743;&and;and
&#8744;&or;or
&#8745;&cap;cap
&#8746;&cup;cup
&#8747;&int;integral
&#8756;&there4;therefore
&#8764;&sim;similar to
&#8773;&cong;congruent to
&#8776;&asymp;almost equal
&#8800;&ne;not equal
&#8801;&equiv;equivalent
&#8804;&le;less or equal
&#8805;&ge;greater or equal
&#8834;&sub;subset of
&#8835;&sup;superset of
&#8836;&nsub;not subset of
&#8838;&sube;subset or equal
&#8839;&supe;superset or equal
&#8853;&oplus;circled plus
&#8855;&otimes;circled times
&#8869;&perp;perpendicular
&#8901;&sdot;dot operator

HTML 支持的希腊字母 

字符实体编号实体名称描述
Α&#913;&Alpha;Alpha
Β&#914;&Beta;Beta
Γ&#915;&Gamma;Gamma
Δ&#916;&Delta;Delta
Ε&#917;&Epsilon;Epsilon
Ζ&#918;&Zeta;Zeta
Η&#919;&Eta;Eta
Θ&#920;&Theta;Theta
Ι&#921;&Iota;Iota
Κ&#922;&Kappa;Kappa
Λ&#923;&Lambda;Lambda
Μ&#924;&Mu;Mu
Ν&#925;&Nu;Nu
Ξ&#926;&Xi;Xi
Ο&#927;&Omicron;Omicron
Π&#928;&Pi;Pi
Ρ&#929;&Rho;Rho
undefinedSigmaf
Σ&#931;&Sigma;Sigma
Τ&#932;&Tau;Tau
Υ&#933;&Upsilon;Upsilon
Φ&#934;&Phi;Phi
Χ&#935;&Chi;Chi
Ψ&#936;&Psi;Psi
Ω&#937;&Omega;Omega
α&#945;&alpha;alpha
β&#946;&beta;beta
γ&#947;&gamma;gamma
δ&#948;&delta;delta
ε&#949;&epsilon;epsilon
ζ&#950;&zeta;zeta
η&#951;&eta;eta
θ&#952;&theta;theta
ι&#953;&iota;iota
κ&#954;&kappa;kappa
λ&#955;&lambda;lambda
μ&#956;&mu;mu
ν&#957;&nu;nu
ξ&#958;&xi;xi
ο&#959;&omicron;omicron
π&#960;&pi;pi
ρ&#961;&rho;rho
ς&#962;&sigmaf;sigmaf
σ&#963;&sigma;sigma
τ&#964;&tau;tau
υ&#965;&upsilon;upsilon
φ&#966;&phi;phi
χ&#967;&chi;chi
ψ&#968;&psi;psi
ω&#969;&omega;omega
ϑ&#977;&thetasym;theta symbol
ϒ&#978;&upsih;upsilon symbol
ϖ&#982;&piv;pi symbol

html支持的其他字符

字符实体编号实体名称描述
Œ&#338;&OElig;capital ligature OE
œ&#339;&oelig;small ligature oe
Š&#352;&Scaron;capital S with caron
š&#353;&scaron;small S with caron
Ÿ&#376;&Yuml;capital Y with diaeres
ƒ&#402;&fnof;f with hook
ˆ&#710;&circ;modifier letter circumflex accent
˜&#732;&tilde;small tilde
&#8194;&ensp;en space
&#8195;&emsp;em space
&#8201;&thinsp;thin space
&#8204;&zwnj;zero width non-joiner
&#8205;&zwj;zero width joiner
&#8206;&lrm;left-to-right mark
&#8207;&rlm;right-to-left mark
&#8211;&ndash;en dash
&#8212;&mdash;em dash
'&#8216;&lsquo;left single quotation mark
'&#8217;&rsquo;right single quotation mark
&#8218;&sbquo;single low-9 quotation mark
"&#8220;&ldquo;left double quotation mark
"&#8221;&rdquo;right double quotation mark
&#8222;&bdquo;double low-9 quotation mark
&#8224;&dagger;dagger
&#8225;&Dagger;double dagger
&#8226;&bull;bullet
&#8230;&hellip;horizontal ellipsis
&#8240;&permil;per mille 
&#8242;&prime;minutes
&#8243;&Prime;seconds
&#8249;&lsaquo;single left angle quotation
&#8250;&rsaquo;single right angle quotation
&#8254;&oline;overline
&#8364;&euro;euro
&#8482; or &#153;&trade;trademark
&#8592;&larr;left arrow
&#8593;&uarr;up arrow
&#8594;&rarr;right arrow
&#8595;&darr;down arrow
&#8596;&harr;left right arrow
&#8629;&crarr;carriage return arrow
&#8968;&lceil;left ceiling
&#8969;&rceil;right ceiling
&#8970;&lfloor;left floor
&#8971;&rfloor;right floor
&#9674;&loz;lozenge
&#9824;&spades;spade
&#9827;&clubs;club
&#9829;&hearts;heart
&#9830;&diams;diamond

标签:WEB,right,mark,&#,arrow,quotation,前端开发,特殊字符,left
来源: https://blog.csdn.net/txr152111/article/details/120924149