Open In App

How to decorate the Text in CSS ?

The CSS property used for text decoration is the text-decoration property. It is used to control the visual styling of text decorations, such as underlines, overlines, and line-throughs.For instance, setting text-decoration: none; on links removes the default underline

Syntax:

The text-decoration the property accepts various values to define different text decorations.

/* Removing underline from links */
a {
    text-decoration: none;
}

/* Adding underline to headings */
h1 {
    text-decoration: underline;
}

Features

The Features of text-decoration Property:

Article Tags :