Computer Science, asked by soodkanishk2459, 2 months ago

Explain css text properties with an example

Answers

Answered by kajalshrivastava0854
3

Answer:

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

CSS text formatting include following properties:

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

1.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).

Syntax:

body

{

color:color name;

}

Example:

<!DOCTYPE html>

<html>

<head>

<style>

h1

{

color:red;

}

h2

{

color:green;

}

</style>

</head>

<body>

<h1>

GEEKS FOR GEEKS

</h1>

<h2>

TEXT FORMATTING

</h2>

</body>

</html>

Answered by ms8515634
0

Explanation:

CSS text formatting include following properties

1 text colour .

2 text alignment .

etc

Similar questions