Web4College

CSS text

There are many text properties that can transform text into uppercase, lowercase. They can specify the position of the text and the space between words or letters.

text-transform

It transforms simple text into other cases. For example, capitalize, uppercase and lowercase.

Preview Example
Try it

text-align

This property decides where to align the text. The value of this property may be right, center and left.

Preview Example
Try it

word-spacing

It represents the additional spacing between the words. It helps in making the textual structure more presentable.

Preview Example
Try it

letter-spacing

It adds the additional space between two letters. But the justification rules (if applied) may increase or decrease the spacing.

Preview Example
Try it

text-justify property adds the justification rules.

line-height

It adds additional space between the lines to enhance the readability. The value may be in px or em units.

Example
Try it
<style>
span{line-height:5px;}
</style>

5px means that one line of the text is at a distance of 5em from the other line. It represents vertical distance between lines.

text-indent

It adds marginal space at the start of lines of text. The indentation may be for the first line or for all the lines except first one. It depends upon the value of the text-indent. There are many values for the this property.

length

The length value indents the first line. For example, 5em means an indentation of 5em.

Example
Try it
<style>
p{text-indent:5em;}
</style>