CSS text-decoration Property

CSS text-decoration property specifies the style and color for a decoration line. It is a shorthand for the below three properties:


  text-decoration: underline;
  text-decoration: underline red wavy;
  text-decoration: overline blue dotted;
  text-decoration: line-through;
  text-decoration: underline overline;

CSS Syntax

The text-decoration property has the below syntax:

text-decoration: text-decoration-line text-decoration-color text-decoration-style|initial|inherit;

Property Values

The text-decoration property accepts the following values:

text-decoration-lineSpecifies the type of text decoration line such as underline, overline, line-through, etc.
text-decoration-colorSpecifies the color of the text decoration line. The color can be specified in any valid CSS color format such as ‘color name’, ‘HEX’, ‘RGB’, ‘HSL’, etc.
text-decoration-styleSpecifies the style of the text decoration line such as ‘solid’, ‘dotted’, ‘wavy’, etc.
initialSets the text-decoration property to its default value.
inheritInherits the text-decoration property from its parent element.

General Info

Default Valuenone currentColor solid
JavaScript Usageelement.style.textDecoration = “underline”;


  • Manoj Kumar

    Hi, My name is Manoj Kumar. I am a full-stack developer with a passion for creating robust and efficient web applications. I have hands-on experience with a diverse set of technologies, including but not limited to HTML, CSS, JavaScript, TypeScript, Angular, Node.js, Express, React, and MongoDB.