In HTML, <, >, &, etc. have special meanings (<, >, for link tags, & for escape), and cannot be used directly. These symbols are not displayed on the web page we finally see. What should we do if we want to display these symbols on the web page? This is where the HTML escape sequence comes in. Escape Sequence is also called Character Entity. In HTML, escape strings are defined for two reasons: The first reason is that symbols such as "<" and ">" are already used to represent HTML tags, so they cannot be used directly as symbols in text. In order to use these symbols in HTML documents, you need to define its escape string. When the interpreter encounters this type of string it interprets it as real characters. When entering an escape string, strictly follow the rules for upper and lower case letters. The second reason is that some characters are not defined in the ASCII character set and therefore need to be represented using escape strings. The escape sequence, or character entity, is divided into three parts: the first part is an 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 (<), you can write < or <. The advantage of using entity names is that they are easier to understand. When you see lt, you can probably guess that it means less than. However, the disadvantage is that not all browsers support the latest entity names. The entity number can be processed by various browsers. Tip: Entity names 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 there is no guarantee that all browsers can recognize it smoothly. "Entity number" does not have this concern, but it is really inconvenient to remember. The most commonly used character entities Character EntitiesDisplay DescriptionEntity NameEntity Number
|
<<: CSS shadow animation optimization tips
>>: Do you know why vue data is a function?
Recently, when I was using Docker to deploy a Jav...
Write configuration files in server.xml and conte...
Example source code: https://codepen.io/shadeed/p...
Introduction Incremental backup means that after ...
The company's business scenario requires the ...
1. Install libfastcommon-1.0.43. The installation...
First, what is database partitioning? I wrote an ...
1. The color of the scroll bar under xhtml In the ...
Table of contents 1. Page Layout 2. Image upload ...
[Who is nslookup?] 】 The nslookup command is a ve...
This article example shares the specific code of ...
This article shares the specific code of React to...
Nowadays, whether you are on the sofa at home or ...
Displaying and interpreting information about you...
Table of contents Preface Installation and Usage ...