HTML Escape Character Table, html Escape characters
Why use an escape string?
<,>, & And so on in HTML have special meanings (<,>, used for the link sign, & used for escaping), and cannot be used directly. These symbols areNot displayed on the page we finally seeWhat 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 reasonSymbols such as "<" and ">" are already used to represent HTML tags, so they cannot be used directly as symbols in 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.Second reasonYes, some characters are not defined in the ASCII character set, so they must be expressed using escape strings.
Composition of escape strings
The Character Entity (Character Entity) is divided into three parts:
The first part is an ampersand symbol;
The second part is the Entity name or # plus the Entity number;
The third part is a semicolon.
For example, to display a smaller sign (<), you can write & lt; or & #60 ;.
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,"Entity name"But it cannot be recognized by all browsers."Entity ID"There is no such worry, but it is really inconvenient to remember.
How to display spaces?
Generally, HTML automatically removes unnecessary spaces. No matter how many spaces you add, it is regarded as a space. For example, if you add 10 spaces between two words, HTML removes 9 spaces and retains only one space. To add spaces to a webpage, you can use & nbsp; to indicate spaces.
List of special HTML Escape characters
The most common character entity:
Display |
Description |
Entity name |
Entity ID |
|
Blank |
& Ensp; |
& #8194; |
|
Wide white space |
& Amp; emsp; |
& #8195; |
|
Blank rows |
& Nbsp; |
& #160; |
< |
Less |
& Lt; |
& #60; |
> |
Greater |
& Gt; |
& #62; |
& |
& Symbol |
& Amp; |
& #38; |
" |
Double quotation marks |
& Quot; |
& Amp; #34; |
|
Copyright |
& Copy; |
& #169; |
|
Registered Trademark |
& Reg; |
& #174; |
|
Trademark (USA) |
|
& #8482; |
× |
Multiplication number |
& Times; |
& #215; |
Bytes |
Division Number |
& Divide; |
& #247; |
Character |
Decimal |
Escape characters |
" |
& Amp; #34; |
& Quot; |
& |
& #38; |
& Amp; |
< |
& #60; |
& Lt; |
> |
& #62; |
& Gt; |
Non-breaking space) |
& #160; |
& Nbsp; |
HTML special Escape Character Table
Character |
Decimal |
Escape characters |
Character |
Decimal |
Escape characters |
Character |
Decimal |
Escape characters |
? |
& #161; |
& Iexcl; |
Á |
& #193; |
& Aacute; |
Á |
& #225; |
& Aacute; |
Bytes |
& #162; |
& Cent; |
 |
& #194; |
& Amp; circ; |
 |
& #226 |
& Acirc; |
Bytes |
& #163; |
& Pound; |
Bytes |
& #195; |
& Atilde; |
Bytes |
& #227; |
& Atilde; |
Bytes |
& #164; |
& Curren; |
Ä |
& #196; |
& Auml |
Ä |
& #228; |
& Auml; |
¥ |
& #165; |
& Yen; |
Bytes |
& #197; |
& Ring; |
Bytes |
& #229; |
& Aring; |
| |
& #166; |
& Brvbar; |
Bytes |
& #198; |
& AElig; |
Bytes |
& #230; |
& Aelig; |
§ |
& #167; |
& Sect; |
C. |
& #199; |
& Ccedil; |
C. |
& #231; |
& Ccedil; |
○ |
& #168; |
& Uml; |
? |
& #200; |
& Egrave; |
? |
& #232; |
& Egrave; |
|
& #169; |
& Copy; |
É |
& #201; |
& Eacute; |
É |
& #233; |
& Eacute; |
A |
& #170; |
& Ordf; |
Bytes |
& #202; |
& Ecirc; |
Bytes |
& #234; |
& Ecirc; |
? |
& #171; |
& Laquo; |
Bytes |
& #203; |
& Euml; |
Bytes |
& #235; |
& Euml; |
? |
& #172; |
& Not; |
Bytes |
& #204; |
& Igrave; |
Bytes |
& #236; |
& Igrave; |
/X7f |
& #173; |
& Shy; |
Í |
& #205; |
& Iacute; |
Í |
& #237; |
& Iacute; |
|
& #174; |
& Reg; |
Bytes |
& #206; |
& Icirc; |
Bytes |
& #238; |
& Icirc; |
Bytes |
& #175; |
& Macr; |
Bytes |
& #207; |
& Iuml; |
Bytes |
& #239; |
& Iuml; |
° |
& #176; |
& Deg; |
Bytes |
& #208; |
& ETH; |
Bytes |
& #240; |
& Ieth; |
± |
& #177; |
& Plusmn; |
N |
& #209; |
& Ntilde; |
N |
& #241; |
& Ntilde; |
2 |
& #178; |
& Sup2; |
Bytes |
& #210; |
& Ograve; |
Bytes |
& #242; |
& Ograve; |
3 |
& #179; |
& Sup3; |
Ó |
& #211; |
& Oacute; |
Ó |
& #243; |
& Oacute; |
′ |
& #180; |
& Acute; |
Bytes |
& #212; |
& Ocirc; |
Bytes |
& #244; |
& Ocirc; |
μ |
& #181; |
& Micro; |
Bytes |
& #213; |
& Otilde; |
Bytes |
& #245; |
& Otilde; |
? |
& #182; |
& Para; |
Ö |
& #214; |
& Ouml; |
Ö |
& #246; |
& Ouml; |
· |
& #183; |
& Middot; |
& Times; |
& #215; |
& Times; |
Bytes |
& #247; |
& Divide; |
? |
& #184; |
& Cedil; |
Ø |
& #216; |
& Oslash; |
Ø |
& #248; |
& Oslash; |
1 |
& #185; |
& Sup1; |
Bytes |
& #217; |
& Ugrave; |
Bytes |
& #249; |
& Ugrave; |
O |
& #186; |
& Ordm; |
Úo |
& #218; |
& Uacute; |
Úo |
& #250; |
& Uacute; |
? |
& #187; |
& Raquo; |
Bytes |
& #219; |
& Ucirc; |
Bytes |
& #251; |
& Ucirc; |
? |
& #188; |
& Frac14; |
Ü |
& #220; |
& Uuml; |
Ü |
& #252; |
& Uuml; |
? |
& #189; |
& Frac12; |
Bytes |
& #221; |
& Yacute; |
Bytes |
& #253; |
& Yacute; |
? |
& #190; |
& Frac34; |
Bytes |
& #222; |
& THORN; |
Bytes |
& #254; |
& Thorn; |
? |
& #191; |
& Iquest; |
Bytes |
& #223; |
& Szlig; |
Bytes |
& #255; |
& Yuml; |
À |
& #192; |
& Agrave; |
À |
& #224; |
& Agrave; |
JavaScript escape character:
Escape Sequence |
Character |
\ B |
Return |
\ F |
Take the form of paper |
\ N |
Line feed |
\ R |
Enter |
\ T |
Horizontal hop (Ctrl-I) |
\' |
Single quotes |
\" |
Double quotation marks |
\\ |
Backslash |
Pay attention to special characters during programming. Many running problems are caused by special characters.
Note: Because the backslash itself is used as an escape character, you cannot directly type A backslash in the script. To generate a backslash, you must enter two backslash (\) together (\\).
References:
Http://tool.oschina.net/
Http://114.xixik.com/character/