In HTML & nbsp; & ensp; & emsp; six kinds of spaces tag

HTML provides five spaces entity (space entity), they have different widths, non-breaking spaces (& nbsp;) is the width of conventional spaces, it runs on all major browsers. Several other spaces (& ensp; & emsp; & thinsp; & zwnj; & zwj;) of different widths at different browsers.
 
It is called non-breaking space, the full name of No-Break Space, which is the most common and most of us use the space, most people may only contact with & nbsp ;, which is produced by pressing the space key space. In HTML, if you produce this space with the space bar, the space is not cumulative (only count 1). To use html entities represented before the accumulation, the space occupied by the width font clear and strong influence.
 
It's called & ldquo; & rdquo ;, en space full name is En Space, en is a unit of measurement typography school, half the width of the em. By definition, it is equivalent to half of the font (e.g. 16px font is 8px). Nominally lowercase n width. This space has always been a family heritage space features: transparent, this space has a very robust feature is its occupied width is just 1/2 the width of the Chinese , but also largely unaffected font affected.
 
It's called & ldquo; & rdquo ;, em space full name is Em Space, em is a unit of measurement typography study, the equivalent of the currently specified number of points. For example, 1 em in the font is 16px 16px. This space also inherited the family has always been a space of features: transparent, this space also has a very robust feature is its occupied width is just a Chinese width , font and basically not affected.
 
It's called narrow spaces, it stands for Thin Space. We might as well call it & ldquo; & rdquo ;, thin space is a space that looked like a thin, thin body, occupy a relatively small width. It is one-sixth of em wide.
‌
It's called zero-width non-joiner, stands for Zero Width Non Joiner, referred to as the & ldquo; ZWNJ & rdquo ;, is a non-printing characters, placed between two characters in electronic text, inhibition of ligatures would have happened, but in this two original font characters to draw. Unicode is zero-width non-joiner character mapping is & ldquo; & rdquo; (zero width non-joiner, U + 200C), HTML numeric character reference is: & zwnj;
‍
It is called zero-width joiner, stands Zero Width Joiner, referred to as & ldquo; ZWJ & rdquo ;, is not a printable character, is placed between some require complex formatting language (e.g., Arabic, Hindi) of two characters, such that the two ligatures will not happen this produces a ligature effect. Even zero-width characters are Unicode code U + 200D (HTML: & zwj; & zwj;).
In addition, the browser will parse the following characters as blank: space (& # x0020;), tab stops (& # x0009;), line feed (& # x000A;) and a carriage return (& # x000D;) also there are (& # 12288;) and so on.
 
 

Guess you like

Origin www.cnblogs.com/idtjie/p/11277602.html