Horje
How to Style the Text using text-decoration Property in CSS ?

The text-decoration property in CSS is used to style the decoration of text, such as underlining, overlining, line-through, and blink effects. It is a versatile property that can enhance the visual appearance of text.

Syntax

/* Example of using the text-decoration property */
.element {
  text-decoration: [value];
}

The text-decoration Property Values

The table below describes text-decoration values and their respective descriptions.

Text Decoration Value Description
none Default value. No text decoration is applied.
underline Adds an underline to the text.
overline Adds a line above the text.
line-through Adds a line through the middle of the text.
blink Causes the text to blink. (Note: Not widely supported and considered obsolete.)

Features

  • Multiple values can be combined to apply different decorations simultaneously.
  • The text-decoration property is often used in conjunction with the :hover pseudo-class for interactive effects.



Reffered: https://www.geeksforgeeks.org


CSS

Related
What is the main axis and cross axis in CSS Flexbox ? What is the main axis and cross axis in CSS Flexbox ?
What is the prefix-free script in CSS ? What is the prefix-free script in CSS ?
What are CSS preprocessors? What are CSS preprocessors?
What is a CSS framework ? What is a CSS framework ?
How to use the ::first-line pseudo-element in CSS ? How to use the ::first-line pseudo-element in CSS ?

Type:
Geek
Category:
Coding
Sub Category:
Tutorial
Uploaded by:
Admin
Views:
13