关于我们

质量为本、客户为根、勇于拼搏、务实创新

< 返回新闻公共列表

HTML实体

发布时间:2020-03-16 00:00:00

   HTML 字符实体


HTML 中的预留字符必须被替换为字符实体。




HTML 实体

在 HTML 中,某些字符是预留的。


在 HTML 中不能使用小于号(


如果希望正确地显示预留字符,我们必须在 HTML 源代码中使用字符实体(character entities)。


字符实体类似这样:


&;
或者
&#;

如需显示小于号,我们必须这样写:< 或 <





不间断空格(non-breaking space)

HTML 中的常用字符实体是不间断空格( )。


浏览器总是会截短 HTML 页面中的空格。如果您在文本中写 10 个空格,在显示该页面之前,浏览器会删除它们中的 9 个。如需在页面中增加空格的数量,您需要使用   字符实体。




HTML 实例示例

用 HTML 实体符号做实验:  here 亲自试一试HTML 实体符号参考手册

HTML ISO-8859-1 参考手册


HTML 4.01 支持 ISO 8859-1 (Latin-1) 字符集。


ISO-8859-1 的较低部分(从 1 到 127 之间的代码)是最初的 7 比特 ASCII。


ISO-8859-1 的较高部分(从 160 到 255 之间的代码)全都有实体名称。


这些符号中的大多数都可以在不进行实体引用的情况下使用,但是实体名称或实体编号为那些不容易通过键盘键入的符号提供了表达的方法。


注释:实体名称对大小写敏感。




带有实体名称的 ASCII 实体







































结果描述实体名称实体编号
"quotation mark""
'apostrophe &apos;'
&ampersand&&
<less-than<<
>greater-than>>



ISO 8859-1 符号实体





















































































































































































































结果描述实体名称实体编号
 non-breaking space  
¡inverted exclamation mark&iexcl;¡
¢cent&cent;¢
£pound&pound;£
¤currency&curren;¤
¥yen&yen;¥
¦broken vertical bar&brvbar;¦
§section&sect;§
¨spacing diaeresis&uml;¨
©copyright&copy;©
ªfeminine ordinal indicator&ordf;ª
«angle quotation mark (left)&laquo;«
¬negation&not;¬
­soft hyphen&shy;­
®registered trademark&reg;®
¯spacing macron&macr;¯
°degree&deg;°
±plus-or-minus &plusmn;±
²superscript 2&sup2;²
³superscript 3&sup3;³
´spacing acute&acute;´
µmicro&micro;µ
paragraph&para;
·middle dot&middot;·
¸spacing cedilla&cedil;¸
¹superscript 1&sup1;¹
ºmasculine ordinal indicator&ordm;º
»angle quotation mark (right)&raquo;»
¼fraction 1/4&frac14;¼
½fraction 1/2&frac12;½
¾fraction 3/4&frac34;¾
¿inverted question mark&iquest;¿
×multiplication&times;×
÷division&divide;÷



ISO 8859-1 字符实体





























































































































































































































































































































































































结果描述实体名称实体编号
Àcapital a, grave accent&Agrave;À
Ácapital a, acute accent&Aacute;Á
Âcapital a, circumflex accent&Acirc;Â
Ãcapital a, tilde&Atilde;Ã
Äcapital a, umlaut mark&Auml;Ä
Åcapital a, ring&Aring;Å
Æcapital ae&AElig;Æ
Çcapital c, cedilla&Ccedil;Ç
Ècapital e, grave accent&Egrave;È
Écapital e, acute accent&Eacute;É
Êcapital e, circumflex accent&Ecirc;Ê
Ëcapital e, umlaut mark&Euml;Ë
Ìcapital i, grave accent&Igrave;Ì
Ícapital i, acute accent&Iacute;Í
Îcapital i, circumflex accent&Icirc;Î
Ïcapital i, umlaut mark&Iuml;Ï
Ðcapital eth, Icelandic&ETH;Ð
Ñcapital n, tilde&Ntilde;Ñ
Òcapital o, grave accent&Ograve;Ò
Ócapital o, acute accent&Oacute;Ó
Ôcapital o, circumflex accent&Ocirc;Ô
Õcapital o, tilde&Otilde;Õ
Öcapital o, umlaut mark&Ouml;Ö
Øcapital o, slash&Oslash;Ø
Ùcapital u, grave accent&Ugrave;Ù
Úcapital u, acute accent&Uacute;Ú
Ûcapital u, circumflex accent&Ucirc;Û
Ücapital u, umlaut mark&Uuml;Ü
Ýcapital y, acute accent&Yacute;Ý
Þcapital THORN, Icelandic&THORN;Þ
ßsmall sharp s, German&szlig;ß
àsmall a, grave accent&agrave;à
ásmall a, acute accent&aacute;á
âsmall a, circumflex accent&acirc;â
ãsmall a, tilde&atilde;ã
äsmall a, umlaut mark&auml;ä
åsmall a, ring&aring;å
æsmall ae&aelig;æ
çsmall c, cedilla&ccedil;ç
èsmall e, grave accent&egrave;è
ésmall e, acute accent&eacute;é
êsmall e, circumflex accent&ecirc;ê
ësmall e, umlaut mark&euml;ë
ìsmall i, grave accent&igrave;ì
ísmall i, acute accent&iacute;í
îsmall i, circumflex accent&icirc;î
ïsmall i, umlaut mark&iuml;ï
ðsmall eth, Icelandic&eth;ð
ñsmall n, tilde&ntilde;ñ
òsmall o, grave accent&ograve;ò
ósmall o, acute accent&oacute;ó
ôsmall o, circumflex accent&ocirc;ô
õsmall o, tilde&otilde;õ
ösmall o, umlaut mark&ouml;ö
øsmall o, slash&oslash;ø
ùsmall u, grave accent&ugrave;ù
úsmall u, acute accent&uacute;ú
ûsmall u, circumflex accent&ucirc;û
üsmall u, umlaut mark&uuml;ü
ýsmall y, acute accent&yacute;ý
þsmall thorn, Icelandic&thorn;þ
ÿsmall y, umlaut mark&yuml;ÿ


/template/Home/Zkeys/PC/Static