text-decoration

Introduction

The text-decoration shorthand CSS property sets the appearance of decorative lines on text.

Examples

Syntax

text-decoration: underline;
text-decoration: line-through red;
text-decoration: none;

Values

text-decoration-line

The text-decoration-line CSS property sets the kind of decoration that is used on text in an element.

  • none
    Default value. Produces no text decoration.

  • underline Each line of text has a decorative line beneath it.

  • line-through Each line of text has a decorative line going through its middle.

text-decoration-color

The text-decoration-color CSS property sets the color of decorations.

text-decoration-style

The text-decoration-style CSS property sets the style of the lines specified by text-decoration-line.

  • solid Draws a single line.

  • double Draws a double line.

  • dotted Draws a dotted line.

  • dashed Draws a dashed line.

  • wavy Draws a wavy line.

Formal definition

Initial valueempty value
Applies totext
Inheritedyes
Animatableno

Differences from Web

Compatibility

LCD tables only load in the browser

Except as otherwise noted, this work is licensed under a Creative Commons Attribution 4.0 International License, and code samples are licensed under the Apache License 2.0.