- Home
- /
- CSS Text Styling
CSS Tutorial
Introduction
CSS Properties
CSS Designing
CSS Advance Topics
CSS FAQs
- Home
- /
- CSS Text Styling
CSS Text Styling
Text is one of the most important parts of any website. With CSS, you can enhance your text beautifully—by aligning it, decorating it, transforming the case, adjusting spacing, and even adding shadows. Let’s explore!
Text Decoration
Use text-decoration
to add lines above, below, or through your text.
Overline text
Underline text
Strikethrough text
Both overline and underline

Text Alignment
Align your text to the left, right, center, or justify it across the container.
Left aligned text
Right aligned text
Center aligned text
This is a longer paragraph to demonstrate justified alignment across a fixed width container. It spreads the text evenly.

Text Transform
Transform your text into uppercase, lowercase, or capitalized format.
this will be uppercase
THIS WILL BE LOWERCASE
capitalize each word in this sentence
This Will Stay As Is

Letter Spacing
Use letter-spacing
to increase or decrease the space between characters.
Learn With Arshyan

Line Height
Adjust the space between lines of text using line-height
.
This is a paragraph with increased line height.
The lines will be spaced farther apart.

Text Shadow
Give your text some depth or glow using text-shadow
.
Shadowed Text

Text Overflow
When text is too long to fit in its container, text-overflow
handles it.
This is some long text that will be truncated with an ellipsis.
This is some long text that will be clipped off.
