I. Why should I use escape characters?
1, the HTML <, >, & And so on have special meaning (<,>, for the link to sign,& for escaping), can not be used directly, these symbols are not displayed in the final page we see, that if we want to display these symbols in the Web page, Need to be escaped.
2. The escape string (Escape Sequence) is also called the character entity (Character entity). In HTML, there are two reasons for defining an escape character: First, the "<" and ">" class symbols are already used to represent HTML tags, so they cannot be used directly as symbols in text. To use these symbols in an HTML document, you need to define their escape strings. When the interpreter encounters such a string, it interprets it as a real character. When entering an escape string, strictly follow the letter casing rules. Second, some characters are not defined in the ASCII character set, so you need to use an escape string to represent them.
Ii. common list of HTML escape characters
Most commonly used character entities |
|
Description |
Entity number |
Half-square-large blank |
  |
The whole square big blank |
  |
Space |
|
Less than |
< |
Greater than |
> |
& Symbols |
& |
Double quotes |
" |
Copyright |
© |
Multiplication sign |
× |
Division Sign |
÷ |
Escape sequences |
|
\b |
Backspace |
\f |
Go paper Wrap |
\ n |
Enter |
\ r |
Line break |
\ t |
Horizontal Jump Grid |
\‘ |
Single quotation marks |
\" |
Double quotes |
\\ |
Back slash |
Java Escape character