Lecture

Text Alignment (text-align), Text Decoration (text-decoration)

Let's learn about the CSS properties text-align and text-decoration, which specify text alignment direction and decoration.


text-align

The text-align property specifies the horizontal alignment of text.


The available values are as follows:

Left Alignment
.left-align { text-align: left; }

Right Alignment
.right-align { text-align: right; }

Center Alignment
.center-align { text-align: center; }

Justified Alignment
.justify-align { text-align: justify; }

text-decoration

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

The available values are as follows:


Underline
.underline { text-decoration: underline; }

Overline
.overline { text-decoration: overline; }

Line-through
.line-through { text-decoration: line-through; }

No Decoration
.no-decoration { text-decoration: none; }

Follow the highlighted parts of the code to input them correctly.

Mission
0 / 1

The text-align property is a CSS property that specifies the vertical alignment of text.

True
False

Lecture

AI Tutor

Design

Upload

Notes

Favorites

Help

HTML
CSS
Loading...