CSS TEXT FORMATTING

CSS text formatting properties is used to format text and style text.

 

1.Text-color
2.Text-alignment
3.Text-decoration
4.Text-transformation
5.Text-indentation
6.Letter spacing
7.Line height
8.Text-direction
9.Text-shadow
10.Word spacing

TEXT COLOR

Text-color property is used to set the color of the text.

Text-color can be set by using the name “red”, hex value “#ff0000” or by its RGB value“rgb(255, 0, 0).

Example:

body
{
color:#ff0000;
}

TEXT ALIGNMENT

Text alignment property is used to set the horizontal alignment of the text.

Possible values:left,right, centered and justified alignment.

Example:

text-align:right;

TEXT DECORATION

Text decoration is used to add or remove decorations from the text.

Text decoration can be underline, overline, line-through or none.

Example:

text-decoration:none;

TEXT TRANSFORMATION

Text transformation property is used to change the case of text, uppercase or lowercase.

Text transformation can be uppercase, lowercase or captitalise .

Capitalise is used to change the first letter of each word to uppercase.

Example:

text-transform:uppercase;

TEXT INDENTATION

Text indentation property is used to indent the first line of the paragraph.
The size can be in px, cm, pt.

Example:

text-indent:50px;

LETTER SPACING

This property is used to specify the space between the characters of the text.
The size can be given in px.

Example:

letter-spacing:3px;

LINE HEIGHT

This property is used to set the space between the lines.

Example:

line-height:1.2px;

TEXT DIRECTION

Text direction property is used to set the direction of the text.

The direction can be set by using rtl : right to left .

Left to right is the default direction of the text.

Example:

direction:rtl;

TEXT SHADOW

Text shadow property is used to add shadow to the text.
You can specify the horizontal size, vertical size and shadow color for the text.

Syntax:

text-shadow:horizontal size vertical size color name;

DOWNLOAD LATEST PROJECTS