HTML BASIC
HTML Introduction
HTML Getting Started
HTML Elements
HTML Attributes
HTML Headings
HTML Paragraphs
HTML Links
HTML Text Formatting
HTML Styles
HTML Images
HTML Tables
HTML Lists
HTML Forms
HTML Iframes
HTML ADVANCED
HTML Doctypes
HTML Layout
HTML Head
HTML Meta
HTML Scripts
HTML Entities
HTML URL
HTML URL Encode
HTML Validation
HTML5 FEATURES
HTML5 New Input Types
HTML5 Canvas
HTML5 SVG
HTML5 Audio
HTML5 Video
HTML5 Web Storage
HTML5 Application Cache
HTML5 Web Workers
HTML5 SSE
HTML5 Geolocation
HTML5 Drag & Drop
HTML Entities - Html5 基础教程 - IT书包
网站首页
HTML Entities
### What is HTML Entity? Some characters are reserved in HTML, e.g. you cannot use the less than (`<`) or greater than (`>`) signs or angle brackets within your text, because the browser could mistake them for markup, while some characters are not present on the keyboard like copyright symbol ©. To display these special characters, they must be replaced with the character entities. Character entity references, or entities for short, enable you to use the characters that cannot be expressed in the document's character encoding or that cannot be entered by a keyboard. ### Frequently Used HTML Character Entities <table class="data align-center"><tbody><tr><th>Result</th><th>Description</th><th>Entity Name</th><th>Numerical reference</th></tr><tr><td> </td><td>non-breaking space</td><td>&nbsp;</td><td>&#160;</td></tr><tr><td><</td><td>less than</td><td>&lt;</td><td>&#60;</td></tr><tr><td>></td><td>greater than</td><td>&gt;</td><td>&#62;</td></tr><tr><td>&</td><td>ampersand</td><td>&amp;</td><td>&#38;</td></tr><tr><td>"</td><td>quotation mark</td><td>&quot;</td><td>&#34;</td></tr><tr><td>'</td><td>apostrophe</td><td>&apos;</td><td>&#39;</td></tr><tr><td>¢</td><td>cent</td><td>&cent;</td><td>&#162;</td></tr><tr><td>£</td><td>pound</td><td>&pound;</td><td>&#163;</td></tr><tr><td>¥</td><td>yen</td><td>&yen;</td><td>&#165;</td></tr><tr><td>€</td><td>euro</td><td>&euro;</td><td>&#8364;</td></tr><tr><td>©</td><td>copyright</td><td>&copy;</td><td>&#169;</td></tr><tr><td>®</td><td>registered trademark</td><td>&reg;</td><td>&#174;</td></tr><tr><td style="font-size:15px;">™</td><td>trademark</td><td>&trade;</td><td>&#8482;</td></tr></tbody></table> You can use numeric character references, instead of entity names. A key benefit of using numeric character references is that, they have stronger browser support, and can be used to specify any Unicode character, whereas entities are limited to a subset of this. > Note: HTML entities names are case-sensitive! Please check out the HTML character entities reference for a complete list of character entities of special characters and symbols. > Tip: Nonbreaking space (` `) is used to create a blank space between two items that cannot be separated by a line break. They are also used to display multiple spaces since web browsers display only one space if multiple spaces are created using the spacebar key.
上一篇:
HTML Scripts
下一篇:
HTML URL