# CSS Text,Decoration,Transformation,Spacing

# ****CSS Text****

CSS has a lot of properties for formatting text.

**Text Color and Background Color👇**
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1670344920011/UhbsypWsJ.png align="left")
**CSS Text Alignment**

The `text-align` property is used to set the horizontal alignment of a text. ( left alignment is default )

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1670344942185/5I3kXAsb_.png align="left")
Example of right alignment👇 

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1670344963337/OY2wdx5Ec.png align="left")
Example of justify alignment👇 

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1670344994899/4IsSHYX7T.png align="left")
# Text Align Last

The `text-align-last` property specifies how to align the last line of a text

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1670345015307/2TCLB_pIW.png align="left")
# Vertical Alignment

The `vertical-align` property sets the vertical alignment of an element.


![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1670345039308/FdnHKyg40.png align="left")
Example of vertical-align : middle👇 

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1670345057462/O8aRR6ud5.png align="left")


# **CSS Text Decoration**

Here, we will discuss the following topics👇

- `text-decoration-line`
- `text-decoration-color`
- `text-decoration-style`
- `text-decoration-thickness`
- `text-decoration`

## 1. text-decoration-line👇

The `text-decoration-line` property is used to add a decoration line to the text.

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1670345101295/pAY3m7K8T.png align="left")

Example👇 
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1670345136129/JuGTaShB7.png align="left")

## 2. text-decoration-color👇

The `text-decoration-color` property is used to set the color of the decoration line.


![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1670345154041/U4Z6-HXZe.png align="left")

# 3. text-decoration-style👇

The `text-decoration-style` property is used to set the style of the decoration line.
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1670345189326/4_rXhaEzw.png align="left")

Example 👇
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1670345213930/1aZLHs00Z.png align="left")

## 4. text-decoration-thickness👇

The `text-decoration-thickness` property is used to set the thickness of the decoration line.

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1670345248317/OFAf0Us01.png align="left")


Example 👇
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1670345270770/eNl3l5CPu.png align="left")

# The Shorthand Property

The `text-decoration` property is a shorthand property for:

- `text-decoration-line` (required)
- `text-decoration-color` (optional)
- `text-decoration-style` (optional)
- `text-decoration-thickness` (optional)


![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1670345359513/ngfOsMsKR.png align="left")

# **CSS Text Spacing**

Here, we will discuss the following topics👇

- `text-indent`
- `letter-spacing`
- `line-height`
- `word-spacing`
- `white-space`

# Text Indentation

The `text-indent` property is used to specify the indentation of the first line of a text:

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1670345401535/BX2DStP-1.png align="left")

Example of text-indent 👇
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1670345423212/HEy0aOlus.png align="left")


-----------------------------------------------------------------------------------------------
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1666336375150/5HqI8zNVh.png align="left")> 
Download our HTML & CSS Visual Treat! ebook Here: 
[Click here](https://codemarch.gumroad.com/l/hxazr)
