CSS TEXT

CSS COLOR

The property color is used to specify the text color.

Example:

body {color:blue}

The color can be defined in three ways:

1. - Indicating the name of the color

body {color:blue}

2. - Indicating the color HEX value

body {color: #00ff00}

3. - Indicating the RGB color value

body {rgb(255,0,0)}

TEXT ALIGNMENT

Used to indicate the horizontal alignment of the text.
The alignment can be left, right, center and justified.

Syntax TEXT ALIGNMENT

Alignment of the text to the left

text-align:left;

Alignment of the text to the right

text-align:right;

Alignment of text to center

text-align:center;

Justified text alignment

text-align:justify;

TEXT DECORATION

The attribute text-decoration is used to add or remove text decorations.

Syntax:

To put a line through our text

{text-decoration:overline}

To delete a text:

{text-decoration:line-through;}

To underline text

{text-decoration:underline;}

To blink a text

{text-decoration:blink;}

TEXT TRANSFORM

The attribute text-transform is used to convert text to uppercase or lowercase.

Syntax:

To convert text to uppercase:

{text-transform:uppercase;}

To convert text to lowercase:

{text-transform:lowercase;}

To put the first letter of a text in uppercase

{text-transform:capitalize;}

Example TEXT TRANSFORM:

We can create a style called "uppercase" and then use it where we want to convert some text to uppercase:

.uppercase {text-transform:uppercase;}

TEXT INDENT

TEXT IDENT is used so that the first line of a paragraph begins a little more to the right than the rest of the paragraph

For example, if we want all paragraphs are your first line separated a bit (50 px) to the right:

p {text-indent:50px;}