This article describes in detail the special meanings of the HTML Escape Character EscapeSequence HTML <,>, and so on (<,>, used for the link tag, & used for escape), and cannot be used directly. These symbols are not displayed on the webpage we finally see. What should we do if we want to display these symbols on the webpage?
This involves the HTML Escape string (Escape Sequence.
The Escape string (Escape Sequence) is also called the Character Entity ). In HTML, there are two reasons for defining escape strings: The first reason is that symbols such as "<" and ">" are already used to represent HTML tags, therefore, it cannot be used directly as a symbol in the text. To use these symbols in HTML documents, you need to define its escape string. When the interpreter encounters such a string, it is interpreted as a real character. When you enter an escape string, you must strictly follow the uppercase/lowercase rules. The second reason is that some characters are not defined in the ASCII character set, so escape strings must be used for representation.
The Character Entity is divided into three parts: The first part is an & symbol, which is called ampersand; the second part is an Entity) name or # With the Entity number; the third part is a semicolon.
For example, to display a smaller sign (<), you can write <or <.
The advantage of using an Entity name is that it is easy to understand. When you look at it, you can probably guess what it means to be less, however, not all browsers support the latest Entity names. Entity numbers can be processed by various browsers.
Tip: Entity names are case sensitive.
Note: The same symbol can be referenced by "entity name" or "entity number". The advantage of "entity name" is that it is easy to remember, but it cannot be ensured that all browsers can recognize it smoothly, and the "entity number" is not worried, but it is inconvenient to remember.
The most common character entity
Character Entities show entity name entity number
|
Blank |
|
|
|
Wide white space |
|
|
|
Blank rows |
|
|
< |
Less |
< |
< |
> |
Greater |
> |
> |
& |
& Symbol |
& |
& |
" |
Double quotation marks |
" |
" |
© |
Copyright |
© |
© |
® |
Registered Trademark |
® |
® |
™ |
Trademark (USA) |
™ |
™ |
× |
Multiplication number |
× |
× |
& Pide; |
Division Number |
& Pide; |
Bytes |