CSS Tutorial – 13 – Spacing Properties


Here we have some properties dealing with
spacing. Line-height sets the distance between lines.
By default it will inherit the line-height of its parent and the initial value is called
normal. Word-spacing sets the space between words
and letter-spacing sets spacing between characters. White-space can change how white space characters
inside of a block element are handled. Now let’s look at each property.
We can set the line-height to any length, such as 1.5 em-height. It can also be a percentage
of the current font size or just a number that is multiplied with the font size.
We can also change the word-spacing to half the font size, and the letter spacing to 1/10.
Lastly, setting white-space to preformatted makes the browser ignore the whitespace. And
nowrap lets the text continue without wrapping at the edges.

Add a Comment

Your email address will not be published. Required fields are marked *