【前端HTML】&&&nbsp在html里是什么意思

&&&nbsp在html里是什么意思

如何在html里打出<,>,&,",©,这需要用到html的转义字符

此表翻译过来如下👇

字符 十进制 转义字符
":引号 &#34; &quot;
& &#38; &amp;
< &#60; &lt;
> &#62; &gt;
不断开空格(non-breaking space):"空" &#160; &nbsp;

转义字符串在HTML中的作用:

转义字符串在HTML中,定义转义字符串的原因有两个:

第一个问原因是像“<”和“>”这类符号已经用来表示HTML标签,因此就不能直接当做文本中的符号来使用。为了在HTML文档中使用这些符号,就需要内定义它的转义字符串。

当解释程序遇容到这类字符串时就把它解释为真实的字符。在输入转义字符串时,要严格遵守字母大小写的规则。

第二个原因是,有些字符在ASCII字符集中没有定义,因此需要使用转义字符串来表示。

HTML特殊转义字符对照表
字符 十进制 转义字符 字符 十进制 转义字符 字符 十进制 转义字符
? &#161; &iexcl; Á &#193; &Aacute; á &#225; &aacute;
&#162; &cent; Â &#194; &circ; â &#226 &acirc;
&#163; &pound; Ã &#195; &Atilde; ã &#227; &atilde;
¤ &#164; &curren; Ä &#196; &Auml ä &#228; &auml;
&#165; &yen; Å &#197; &ring; å &#229; &aring;
| &#166; &brvbar; Æ &#198; &AElig; æ &#230; &aelig;
§ &#167; &sect; Ç &#199; &Ccedil; ç &#231; &ccedil;
¨ &#168; &uml; È &#200; &Egrave; è &#232; &egrave;
© &#169; &copy; É &#201; &Eacute; é &#233; &eacute;
a &#170; &ordf; Ê &#202; &Ecirc; ê &#234; &ecirc;
? &#171; &laquo; Ë &#203; &Euml; ë &#235; &euml;
? &#172; &not; Ì &#204; &Igrave; ì &#236; &igrave;
/x7f &#173; &shy; Í &#205; &Iacute; í &#237; &iacute;
® &#174; &reg; Î &#206; &Icirc; î &#238; &icirc;
ˉ &#175; &macr; Ï &#207; &Iuml; ï &#239; &iuml;
° &#176; &deg; Ð &#208; &ETH; ð &#240; &ieth;
± &#177; &plusmn; Ñ &#209; &Ntilde; ñ &#241; &ntilde;
2 &#178; &sup2; Ò &#210; &Ograve; ò &#242; &ograve;
3 &#179; &sup3; Ó &#211; &Oacute; ó &#243; &oacute;
&#180; &acute; Ô &#212; &Ocirc; ô &#244; &ocirc;
μ &#181; &micro; Õ &#213; &Otilde; õ &#245; &otilde;
? &#182; &para; Ö &#214; &Ouml; ö &#246; &ouml;
· &#183; &middot; &times; &#215; &times; ÷ &#247; &divide;
? &#184; &cedil; Ø &#216; &Oslash; ø &#248; &oslash;
1 &#185; &sup1; Ù &#217; &Ugrave; ù &#249; &ugrave;
o &#186; &ordm; Ú &#218; &Uacute; ú &#250; &uacute;
? &#187; &raquo; Û &#219; &Ucirc; û &#251; &ucirc;
? &#188; &frac14; Ü &#220; &Uuml; ü &#252; &uuml;
? &#189; &frac12; Ý &#221; &Yacute; ý &#253; &yacute;
? &#190; &frac34; Þ &#222; &THORN; þ &#254; &thorn;
? &#191; &iquest; ß &#223; &szlig; ÿ &#255; &yuml;
À &#192; &Agrave; à &#224; &agrave;  
posted @ 2020-04-08 12:10  青墟  阅读(6108)  评论(0编辑  收藏  举报