<,>, & etc. have special meanings (<,>, used for link signatures, & for escape), and cannot be used directly. These symbols are not displayed in the web page we finally see, so what if we want these symbols to be displayed on the web page?
This comes to HTML escape strings (Escape Sequence).
Escape strings (Escape Sequence) are also called character entities (Character Entity). In HTML, there are two reasons for defining escaped strings: the first is that symbols like < and > have been used to represent HTML tags, so they cannot be used directly as symbols in text. In order to use these symbols in HTML documents, it is necessary to define its escape string. When the interpreter encounters such a string, it is interpreted as a real character. When entering escape strings, strictly abide by the rules of letter case. The second reason is that some characters are not defined in the ASCII character set, so they need to be represented using escaped strings.
Escape Sequence, that is, character entity (Character Entity) is divided into three parts: the first part is an ampersand, in English; the second part is the name of the entity (Entity) or the number of the # plus entity (Entity); the third part is a semicolon.
For example, if you want to display a sign less than (<), you can write < or <.
The advantage of using Entity names is that they are easier to understand. When you look at lt, you can probably guess that it means less than, but its disadvantage is that not all browsers support the latest Entity names. Entity numbers can be processed by various browsers.
Tip: Entity names (Entity) are case sensitive.
Note: The same symbol can be referenced in two ways: entity name and entity number. The advantage of entity name is that it is easy to remember, but it cannot guarantee that all browsers can recognize it smoothly. The entity number does not have this concern, but it is really inconvenient to remember.
The most commonly used character entities
Character Entities Display Description Entity Name Entity Number
| A half square blank |   |   | |
| A big gap in all aspects |   |   | |
| The continuous blank space | |   | |
| < | Less than | < | < |
| > | Greater than | > | > |
| & | &symbol | & | & |
| Double quotes | " | " | |
| © | copyright | © | © |
| ® | Registered trademark | ® | ® |
| ™ | Trademark (USA) | ™ | ™ |
| × | Multiplication sign | × | × |
| ÷ | Digit | ÷ | ÷ |