HTML - HTML Commonly Used Character Entities
HTML Entities
Some characters are reserved in HTML.
It is not possible to use the less than (<) or greater than (>) signs in your text, because the browser will mix them with tags.
To actually display reserved characters, we must use character entities in the HTML source code.
A character entity looks like this:
OR
&#entity_number;
To display a less than sign we must write: < or <
Tip: The advantage of using an entity name, instead of a number, is that the name is easier
to remember. However, the disadvantage is that browsers may not support all entity names (the support for entity numbers is very good).
Non-breaking Space
A common character entity used in HTML is the non-breaking space ( ).
Browsers will always truncate spaces in HTML pages. If you write 10 spaces in your text, the browser will remove 9 of them, before displaying the page. To add spaces to your text, you can use the character entity.
HTML Entities Example
Experiment with HTML character entities: filename=tryhtml_entities" style="line-height:21px; text-decoration:none; color:rgb(144,11,9); background-color:transparent">Try
it yourself
HTML Useful Character Entities
Note: Entity names are case sensitive!
| Result | Description | Entity Name | Entity Number |
|---|---|---|---|
| non-breaking space | | ||
| < | less than | < | < |
| > | greater than | > | > |
| & | ampersand | & | & |
| ? | cent | ¢ | ¢ |
| ? | pound | £ | £ |
| ? | yen | ¥ | ¥ |
| ? | euro | € | € |
| § | section | § | § |
| ? | copyright | © | © |
| ? | registered trademark | ® | ® |
| ? | trademark | ™ | ™ |
For a complete reference of all character entities, visit our HTML Entities
Reference.
HTML ISO-8859-1 Reference
Modern browsers supports several character-sets:
- ASCII character set
- Standard ISO character sets
- Mathematical symbols, Greek letters, and other symbols
ISO-8859-1
ISO-8859-1 is the default character set in most browsers.
The first 128 characters of ISO-8859-1 is the original ASCII character-set (the numbers from 0-9, the uppercase and lowercase English alphabet, and some special characters).
The higher part of ISO-8859-1 (codes from 160-255) contains the characters used in Western European countries and some commonly used special characters.
Entities are used to implement reserved characters or to express characters that cannot easily be entered with the keyboard.
Reserved Characters in HTML
Some characters are reserved in HTML and XHTML. For example, you cannot use the greater than or less than signs within your text because the browser could mistake them for markup.
HTML and XHTML processors must support the five special characters listed in the table below:
| Character | Entity Number | Entity Name | Description |
|---|---|---|---|
| " | " | " | quotation mark |
| ' | ' | ' | apostrophe |
| & | & | & | ampersand |
| < | < | < | less-than |
| > | > | > | greater-than |
Note: Entity names are case sensitive!
ISO 8859-1 Symbols
| Character | Entity Number | Entity Name | Description |
|---|---|---|---|
| | non-breaking space | ||
| ? | ¡ | ¡ | inverted exclamation mark |
| ? | ¢ | ¢ | cent |
| ? | £ | £ | pound |
| ¤ | ¤ | ¤ | currency |
| ? | ¥ | ¥ | yen |
| ? | ¦ | ¦ | broken vertical bar |
| § | § | § | section |
| ¨ | ¨ | ¨ | spacing diaeresis |
| ? | © | © | copyright |
| ? | ª | ª | feminine ordinal indicator |
| ? | « | « | angle quotation mark (left) |
| ? | ¬ | ¬ | negation |
| | ­ | soft hyphen | |
| ? | ® | ® | registered trademark |
| ? | ¯ | ¯ | spacing macron |
| ° | ° | ° | degree |
| ± | ± | ± | plus-or-minus |
| ? | ² | ² | superscript 2 |
| ? | ³ | ³ | superscript 3 |
| ? | ´ | ´ | spacing acute |
| ? | µ | µ | micro |
| ? | ¶ | ¶ | paragraph |
| · | · | · | middle dot |
| ? | ¸ | ¸ | spacing cedilla |
| ? | ¹ | ¹ | superscript 1 |
| ? | º | º | masculine ordinal indicator |
| ? | » | » | angle quotation mark (right) |
| ? | ¼ | ¼ | fraction 1/4 |
| ? | ½ | ½ | fraction 1/2 |
| ? | ¾ | ¾ | fraction 3/4 |
| ? | ¿ | ¿ | inverted question mark |
| × | × | × | multiplication |
| ÷ | ÷ | ÷ | division |
ISO 8859-1 Characters
| Character | Entity Number | Entity Name | Description |
|---|---|---|---|
| ? | À | À | capital a, grave accent |
| ? | Á | Á | capital a, acute accent |
| ? | Â | Â | capital a, circumflex accent |
| ? | Ã | Ã | capital a, tilde |
| ? | Ä | Ä | capital a, umlaut mark |
| ? | Å | Å | capital a, ring |
| ? | Æ | Æ | capital ae |
| ? | Ç | Ç | capital c, cedilla |
| ? | È | È | capital e, grave accent |
| ? | É | É | capital e, acute accent |
| ? | Ê | Ê | capital e, circumflex accent |
| ? | Ë | Ë | capital e, umlaut mark |
| ? | Ì | Ì | capital i, grave accent |
| ? | Í | Í | capital i, acute accent |
| ? | Î | Î | capital i, circumflex accent |
| ? | Ï | Ï | capital i, umlaut mark |
| ? | Ð | Ð | capital eth, Icelandic |
| ? | Ñ | Ñ | capital n, tilde |
| ? | Ò | Ò | capital o, grave accent |
| ? | Ó | Ó | capital o, acute accent |
| ? | Ô | Ô | capital o, circumflex accent |
| ? | Õ | Õ | capital o, tilde |
| ? | Ö | Ö | capital o, umlaut mark |
| ? | Ø | Ø | capital o, slash |
| ? | Ù | Ù | capital u, grave accent |
| ? | Ú | Ú | capital u, acute accent |
| ? | Û | Û | capital u, circumflex accent |
| ? | Ü | Ü | capital u, umlaut mark |
| ? | Ý | Ý | capital y, acute accent |
| ? | Þ | Þ | capital THORN, Icelandic |
| ? | ß | ß | small sharp s, German |
| à | à | à | small a, grave accent |
| á | á | á | small a, acute accent |
| ? | â | â | small a, circumflex accent |
| ? | ã | ã | small a, tilde |
| ? | ä | ä | small a, umlaut mark |
| ? | å | å | small a, ring |
| ? | æ | æ | small ae |
| ? | ç | ç | small c, cedilla |
| è | è | è | small e, grave accent |
| é | é | é | small e, acute accent |
| ê | ê | ê | small e, circumflex accent |
| ? | ë | ë | small e, umlaut mark |
| ì | ì | ì | small i, grave accent |
| í | í | í | small i, acute accent |
| ? | î | î | small i, circumflex accent |
| ? | ï | ï | small i, umlaut mark |
| ? | ð | ð | small eth, Icelandic |
| ? | ñ | ñ | small n, tilde |
| ò | ò | ò | small o, grave accent |
| ó | ó | ó | small o, acute accent |
| ? | ô | ô | small o, circumflex accent |
| ? | õ | õ | small o, tilde |
| ? | ö | ö | small o, umlaut mark |
| ? | ø | ø | small o, slash |
| ù | ù | ù | small u, grave accent |
| ú | ú | ú | small u, acute accent |
| ? | û | û | small u, circumflex accent |
| ü | ü | ü | small u, umlaut mark |
| ? | ý | ý | small y, acute accent |
| ? | þ | þ | small thorn, Icelandic |
| ? | ÿ | ÿ | small y, umlaut mark |
HTML - HTML Commonly Used Character Entities的更多相关文章
- HTML字符实体(Character Entities),转义字符串(Escape Sequence)
为什么要用转义字符串? HTML中<,>,&等有特殊含义(<,>,用于链接签,&用于转义),不能直接使用.这些符号是不显示在我们最终看到的网页里的,那如果我们希 ...
- HTML字符实体(Character Entities),转义字符串(Escape Sequence)【转】
为什么要用转义字符串? HTML中<,>,&等有特殊含义(<,>,用于链接签,&用于转义),不能直接使用.这些符号是不显示在我们最终看到的网页里的,那如果我们希 ...
- HTML字符实体(Character Entities),转义字符串(Escape Sequence) 转
为什么要用转义字符串? HTML中<,>,&等有特殊含义(<,>,用于链接签,&用于转义),不能直接使用.这些符号是不显示在我们最终看到的网页里的,那如果我们希 ...
- [转]HTML字符实体(Character Entities),转义字符串(Escape Sequence)
为什么要用转义字符串? HTML中<,>,&等有特殊含义(<,>,用于链接签,&用于转义),不能直接使用.这些符号是不显示在我们最终看到的网页里的,那如果我们希 ...
- HTML字符实体(Character Entities)与 转义字符串(Escape Sequence)(转)
为什么要用转义字符串?HTML中<,>,&等有特殊含义(<,>,用于链接签,&用于转义),不能直接使用.这些符号是不显示在我们最终看到的网页里的,那如果我们希望 ...
- List of XML and HTML character entity references
A character entity reference refers to the content of a named entity. An entity declaration is creat ...
- 【译】DTD - Entities
原文:DTD - Entities 实体用于定义XML文档中特殊字符的快捷方式. 实体主要有四种类型: 内置实体(Built-in entities) 字符实体(Character entities) ...
- SCALA XML pattern attrbute(属性)
from: Working with Scala's XML Support 虽然这个guy炒鸡罗嗦,但是还是讲到我要的那句话: Because Scala doesn't support XML ...
- java转换 HTML字符实体,java特殊字符转义字符串
为什么要用转义字符串? HTML中<,>,&等有特殊含义(<,>,用于链接签,&用于转义),不能直接使用.这些符号是不显示在我们最终看到的网页里的,那如果我们希 ...
随机推荐
- python 爬一下
1.安装Requestswindow:pip install requestslinux:sudo pip install requests国内安装缓慢,建议到:http://www.lfd.uci. ...
- IT第十八天 - 类的封装、继承、重载、上周总结★★★
IT第十八天 上午 封装 1.关键字this,是表示该类在实例化时的对象,即this.表示为该对象的属性 2.类的数据保护,set.get方法的写法规则,为了之后的反射机制的读取数据,set方法中对于 ...
- kinit manual
Name kinit - obtain and cache Kerberos ticket-granting ticket Synopsis kinit [-V] [-l lifetime] [-s ...
- Sqoop处理Clob与Blob字段
[Author]: kwu Sqoop处理Clob与Blob字段,在Oracle中Clob为大文本.Blob存储二进制文件. 遇到这类字段导入hive或者hdfs须要特殊处理. 1.oracle中的測 ...
- 【LigerUI】ajax请求firefox返回NS_BINDING_ABORTED
在ligergrid中请求链接,post提交,返回NS_BINDING_ABORTED. 是因为ligergrid中默认是异步提交方式,如果没有设置同步的话, 在请求该链接的时候第一次请求还没有执行完 ...
- 利用 操作符特性 代替if判断语句
参考:http://blog.csdn.net/speedme/article/details/22916181 1.&&的判断特性 #include <stdio.h> ...
- 2015 款 Macbook Pro 的 ForceTouch 触控板开启 三指拖动
RT, 默认的触控板设置中没有了三指拖动这个选项, 但是可以通过勾选 辅助功能 -> 鼠标与触控板 -> 触控板选项 中的 启用拖移 来启用三指拖动...
- Cin、Cout 加快效率方法
std::ios::sync_with_stdio(false); 在main 函数中加上这么一句话. 可以打消iostream的输入输出缓存,可以节省许多时间,使效率与scanf与printf相差无 ...
- 怎样为ubuntu eclipse 添加 GBK字符集
以前没有发现,最近把自己的代码靠到同学电脑上运行报错,发现是字符集的问题,一般来说 eclipse默认的是GBK编码,而ubuntu上默认是没有GBK编码的,所以ubuntu eclipse 上自然就 ...
- Android新增API之AudioEffect中文API与应用实例
在Android2.3中增加了对音频混响的支持,这些API包含在android.media.audiofx包中. 一.概述 AudioEffect是android audio framework(an ...