and other 6 blank spaces in HTML

HTML provides 5 kinds of space entities (space entities), which have different widths. The non-breaking space (  ) is the width of a regular space and can run on all major browsers. Several other spaces (       ‌ ‍) have different widths in different browsers.

 

It is called No-Break Space, the full name is No-Break Space, it is the most common and we use the most space, most people may only touch it,  it is the space generated by pressing the space key. In HTML, if you use the space bar to generate this space, the space will not be accumulated (only counted as 1). It can be accumulated only when represented by html entities, and the width of the space is obviously and strongly affected by the font.

 

It is called "half-width space", the full name is En Space, en is the unit of measurement of typography, half the width of em. By definition, it is equal to half the font size (e.g. 8px in a 16px font). Nominally the width of a lowercase n. This space inherits the consistent characteristics of the space family: transparent, this space has a very robust feature, that is, the width it occupies is exactly 1/2 of the Chinese width, and it is basically not affected by the font.

 

It is called "full-width space", and its full name is Em Space. Em is the measurement unit of typography, which is equivalent to the currently specified number of points. For example, 1 em is 16px in a 16px font. This space also inherits the consistent characteristics of the space family: transparent, and this space also has a fairly robust feature, that is, the width it occupies is exactly 1 Chinese width, and it is basically not affected by the font.

 

It is called a narrow space, and its full name is Thin Space. We might as well call it "thin space", that is, the space is relatively thin, with a thin body and occupies a relatively small width. It is one-sixth of an em wide.

‌

It is called Zero Width Non Joiner, and its full name is Zero Width Non Joiner, or "ZWNJ" for short. The original glyph of each character is drawn. The zero-width non-joiner character in Unicode is mapped to "" (zero width non-joiner, U+200C), and the HTML character value reference is:‌

‍

It is called Zero Width Joiner, its full name is Zero Width Joiner, referred to as "ZWJ", it is a non-printing character, placed between two characters that require complex typesetting languages ​​(such as Arabic, Hindi), making this Two characters that would not otherwise hyphenate produce a hyphenation effect. The Unicode code point for the zero-width hyphen is U+200D (HTML: ‍ ‍).

also

Browsers also interpret the following characters as whitespace: spaces (  ), tabs ( 	), newlines ( ), carriage returns ( 
), 
and (  ), among others.

insert image description here

Guess you like

Origin blog.csdn.net/snans/article/details/129269665