When I first learned the web standard, there was one:
Encode all <and & special characters:
Any minor sign (<), not part of the tag, must be encoded as & l t; any major sign (>), not part of the tag, must be encoded as & g t;
Any ampersand (&), not part of an object, must be encoded as & a m p;
Note: There is no space between the above characters.
We often encounter this situation in our daily work:
More>
Most of their counterparts in China write two big Yu numbers & gt; or simply write> (more exaggerated is that some people use separately to pursue the same effect ), A more reasonable statement is as follows:
<Style> a: after {content: '\ 00BB' ;}</style> <a href = ""> more </a>
\ 00BB-right double angle quote, unicode = & raquo ;(»)
Because IE6/7 does not support the after pseudo-class, it is good to write the following code in the first step:
<A href = ""> More & raquo; </a>
Display Effect:
More»
The best example is the path in the lower left corner of the wordpress Editor:
While the breadcrumb navigation area is often written as a greater sign than & lt; instead, it should be & rsaquo; according to the title statement in the wordpress Background:
<Title> Add a new article & lsaquo; 99css & #8212; WordPress </title>
The display effect is as follows:
Add a new article named ‹ 99css-WordPress
Change the l of & lsaquo; to r.
In addition, aoao and Xiaofei discussed spaces on twitter. Xiaofei said:
The test shows that the space is still represented by \ u0020, which indicates the best compatibility and semantics.
I don't quite agree. My point is: Using & nbsp; in html, while using \ 20 in css is more reasonable: p
Additional reading
- Using HTML Symbol Entities Chinese Translation: Use HTML character entity
- Character Entity Reference HTML 4
- Character reference and white space characters