Hướng dẫn html tab space
Spacing can be added using HTML and CSS by 3 approaches: Method 1: Using the special characters designated for different spaces The character entity used to denote a non-breaking space which is a fixed space. This may be perceived as twice the space of a normal space. It is used to create a space in a line that cannot be broken by word wrap. The character entity used to denote an ‘en’ space which means half point size of the current font. This may be perceived as twice the space of a normal space. The character entity used to denote an ’em’ space which means equal to the point size of the current font. This may be perceived as four times the space of a normal space. Syntax: Regular space: Two spaces gap: Four spaces gap: Example:
In the above code the regular space and two space and four space gaps code is not visible so here is how it looks Output: Method 2: Using the tab-size property to set spacing for tab characters The tab-size CSS property is set the number of spaces each tab character will display. Changing this value allows inserting the needed amount of space on one tab character. This method however only works with pre-formatted text (using tags). |