HTML styles in the blank spaces


   HTML provides five spaces entity (space entity), they have different widths, non-breaking spaces (& nbsp;) is the width of conventional spaces, runs on all major browsers. Several other spaces (& ensp; & emsp; & thinsp; & zwnj; & zwj;) of different widths at different browsers.

一.& nbsp;

   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.

two. & Ensp;

   It's called "half-size space", stands En Space, en is the unit of measurement to learn typography, em is half the width. 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 fairly robust nature, it is occupied by its width is just 1/2 the width of the Chinese, but also largely unaffected font affected.

three. & Emsp;

   It's called "full-space", stands 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 fairly robust nature, it is occupied by its width is just a Chinese width, font and basically not affected.

四.& thinsp;

   It's called narrow spaces, it stands for Thin Space. We might call it "thin space" is the space looked like a thin, thin body, occupy a relatively small width. It is one-sixth of em wide.

Five. & Zwnj;

   It's called zero-width non-joiner, stands for Zero Width Non Joiner, referred to as "ZWNJ", is a non-printing characters, placed between two characters in electronic text, inhibition of ligatures would have happened, but in the two the original font characters to draw. Unicode is zero-width non-joiner mapped character "" (zero width non-joiner, U + 200C), HTML numeric character reference to: & # 8204;

六.& zwj;

   It's called zero-width joiner, stands for Zero Width Joiner, referred to as "ZWJ", is a non-printing characters, placed between some require complex typesetting language (such as Arabic, Hindi) of two characters, making this this two ligatures not going to happen had ligature effect. Even zero-width characters are Unicode code U + 200D (HTML: & # 8205; & 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.

Published 22 original articles · won praise 31 · views 10000 +

Guess you like

Origin blog.csdn.net/qq_36158551/article/details/103801285