
Text Decoration
The Art of Embellishment
With the power of CSS, you become a true artisan of design. Whether it’s underlining, overlining, or the dramatic strikethrough, you add the final flourish to your text, like a master jeweler polishing their latest creation. Got a word you’ve fallen out of love with? No worries — just strike it out with line-through. But why stop at a simple line? Infuse your decorations with color — perhaps a gentle coral hue or something a bit bolder.
And the best part? CSS shorthand lets you define all these details in one precise stroke, like an artist completing a masterpiece with a single, elegant brushstroke.
The Final Touch for Your Text
Underlined, Struck Through, or Brilliantly Embellished — Make It Special!

Underline
A Touch of Elegance
An underline is like a delicate ribbon that adds a refined touch to your text. Often seen gracing links, it highlights important words without being too obtrusive.
h1 {
text-decoration: underline;
}
Underlines work wonderfully for links or other key text elements, lending them subtle prominence without stealing the spotlight.

Overline
Protection and Emphasis
An overline is like a gentle roof resting above your text, offering it an added layer of protection while giving your words a touch of significance.
h1 {
text-decoration: overline;
}
Overlines can also be used to highlight text, lending it prominence and a sense of importance.

Strikethrough
Crossing Out and Letting Go
A strikethrough is like a bold, decisive rejection. Simply cross it out, and it’s done. Perfect for making it clear that this part belongs to the past.
h1 {
text-decoration: line-through;
}
Strikethroughs can also be used to emphasize text with incorrect or outdated information.

CSS Shorthand
Long story short
Why wrestle with lengthy, complex spells when you can handle it all in one graceful stroke? With a CSS shorthand, you combine all your text-decoration values into a single, precise statement. Instead of painstakingly setting each property individually, you wield one short, magical brushstroke and voilà – your text is adorned, embellished, and ready to take center stage.
h1 {
text-decoration-line: line-through;
text-decoration-color: coral;
text-decoration-style: dotted;
text-decoration-thickness: 4px;
}
Shorthand
h1 {
text-decoration: line-through coral dotted 4px;
}