HTML escape character
In HTML, a string containing special characters (such as &) is to be displayed on the page, because it will be regarded as the tag structure of HTML when added to the text node, resulting in some errors, so these special characters should be escaped.
For example, in
Tag, add a string "alert ('hello')", and escape the string.
The escape string (Escape Sequence), that is, the character Character Entity, is divided into three parts: the first part is a & symbol, the English part is called ampersand;, the second part is the Entity name or # plus the Entity number; the third part is a semicolon.
For example, to display a less than sign (greater than > >)
& & symbol &
"double quotes"
'single quotation marks & apos
Copyright ©©
Registered trademark ®®
Trademark (USA) ™
× multiplication sign × ×
/ division sign / /