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中<,>,&等有特殊含义(<,>,用于链接签,&用于转义),不能直接使用.这些符号是不显示在我们最终看到的网页里的,那如果我们希 ...
随机推荐
- exp-00091 oracle错误的解决办法
在进行数据库导入导出使用命令exp.imp经常出现exp-00091 这样的错误的时候,我们需要做的是对于环境变量NLS_LANG设置正确 首先,我们先查看需要导出的数据库的字符编码 selec ...
- HDU 4825 Xor Sum 字典树+位运算
点击打开链接 Xor Sum Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 132768/132768 K (Java/Others) ...
- 域用户允许更改IP地址
1.在DC上设置不好使. 2.需在本地用户组里添加到network.......组里. 注意:有的时候,连接不到DC上,是由于DNS的事,需要先去掉不必要的dns地址. 添加完后,需要重启或注销. 另 ...
- PHP - 目录、文件操作
目录操作: <?php /** * Read Directory. * Just read the top-level directory. * @param string $path dire ...
- 修改字符串 ToCharArray()
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T ...
- libev源代码浅析
libev是一个开源的事件驱动库,基于epoll,kqueue等OS提供的基础设施.其以高效出名,它可以将IO事件,定时器,和信号统一起来,统一放在事件处理这一套框架下处理. libev的基本使用方法 ...
- Codeforces Round #253 (Div. 2), problem: (B)【字符串匹配】
简易字符串匹配,题意不难 #include <stdio.h> #include <string.h> #include <math.h> #include < ...
- 处理IIS报“由于 Web 服务器上的“ISAPI 和 CGI 限制”列表设置,无法提供您请求的页面”
“由于 Web 服务器上的“ISAPI 和 CGI 限制”列表设置,无法提供您请求的页面” 详细错误:HTTP 错误 404.2 - Not Found. 由于 Web 服务器上的“ISAPI 和 C ...
- 彻底理解浮动float CSS浮动详解 清除浮动的方法
我们把网页的常用的布局格式分为以下三种: 1.标准流. 所谓的标准流就是,行内元素自己单独一行,而块级元素是上下显示的. 以前我们学习的都是标准流. 注意:标准流使我们网页布局中最稳定的一种结构 ...
- python爬虫实战2百度贴吧爬html
转自:http://blog.csdn.net/wxg694175346/article/details/8927832 import string, urllib2 #定义百度函数 def baid ...