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中<,>,&等有特殊含义(<,>,用于链接签,&用于转义),不能直接使用.这些符号是不显示在我们最终看到的网页里的,那如果我们希 ...
随机推荐
- 55. 略谈Lotus Notes的与众不同及系列文章至此的总结
在二十多年的悠久历史里,Lotus Notes发展出一整套独特的概念.技术和思维.由于它早期惊人的领先时代和后续发展中同样惊人的忠于传统,这位软件领域的寿星在如今发展更新速度远超往日和技术愈趋公开互通 ...
- 谈谈Facebook的聊天系统架构
今天看到一份 Facebook 公司 2009 年的 Slideshow, 介绍它的聊天系统架构, 其中的一张图结构非常清晰, 所以我对这张图谈谈我的看法. Web Tier: 用 PHP 开发, 聊 ...
- 17.2?Replication Implementation 复制实施:
17.2?Replication Implementation 复制实施: 17.2.1 Replication Implementation Details 17.2.2 Replication R ...
- cocos2d-x游戏开发系列教程-超级玛丽05-CMMenuScene
代码下载链接 http://download.csdn.net/detail/yincheng01/6864893 解压密码:c.itcast.cn 背景 上一篇博文提到appDelegate,在该类 ...
- linux 内核头文件 linux kernel header
概述:在进行有关系统软件的安装的时候(编译一个新的驱动,或者安装一个系统级别的测试工具,例如systemtap),经常需要重新编译内核,相应的问题往往与内核头文件有关.那么,什么是内核头文件,为什么需 ...
- android动画效果演示
第一种:TranslateAnimation 动画效果演示: public void move(View view) { // 传统动画效果 TranslateAnimation animation ...
- hdu 4784 Dinner Coming Soon
spfa+优先队列.刚开始只用的spfa,结果tle到死.然后听队友说要用到优先队列,想了想,对时间分层的话的确每一个结点都只进队列一次即可,因为只有大时间才能更新出小时间,然后就wa成shi了.按队 ...
- nginx负载 发向代理配置文件参考
来自server+iis linux可做参考 : #user nobody; worker_processes 8; #worker_cpu_affinity 00000001 00000010 0 ...
- PHPExcel用法
<?php //下面是总结的几个使用方法 include 'PHPExcel.php'; include 'PHPExcel/Writer/Excel2007.php'; //或者include ...
- 纪念一下第一次写的django代码
@csrf_exemptdef new_project_detail(request): if 'project_name' not in request.POST or 'project_po ...