Menu
Riverview Church

TEXT-DECORATION

The text-decoration property is shorthand for text-decoration-line, text-decoration-thickness, text-decoration-style, and text-decoration-color.

SYNTAX

CSS

text-decoration: value;

JS

object.style.textDecoration = "value";

VALUES

<'text-decoration'> = <'text-decoration-line'> || <'text-decoration-thickness'> || <'text-decoration-style'> || <'text-decoration-color'>
<'text-decoration-line'> = none | [ underline || overline || line-through || blink ]
none

Neither produces nor inhibits text decoration.

underline

Each line of text is underlined.

overline

Each line of text has a line over it.

line-through

Each line of text has a line through the middle.

blink

The text blinks.

<'text-decoration-thickness'> = auto | from-font | <length> | <percentage>
auto

Automatically specified by the user agent.

from-font

If the first available font has metrics indicating a preferred underline width, use that width, otherwise behaves as auto.

<length>

Specifies the length using a number followed by a unit of measurement.

<percentage>

Specifies the percentage using a number followed by a percent sign (%).

<'text-decoration-style'> = solid | double | dotted | dashed | wavy
solid

Indicates a solid line.

double

Indicates a double line.

dotted

Indicates a dotted line.

dashed

Indicates a dashed line.

wavy

Indicates a wavy line.

<'text-decoration-color'> = <color>
<color>

Specifies the color using a keyword or a numerical specification.

EXAMPLES

TEXT-DECORATION-LINE | NONE

TEXT-DECORATION-LINE | UNDERLINE

TEXT-DECORATION-LINE | OVERLINE

TEXT-DECORATION-LINE | LINE-THROUGH

TEXT-DECORATION-LINE | BLINK

TEXT-DECORATION-THICKNESS | AUTO

TEXT-DECORATION-THICKNESS | FROM-FONT

TEXT-DECORATION-THICKNESS | LENGTH

TEXT-DECORATION-THICKNESS | PERCENTAGE

TEXT-DECORATION-STYLE | SOLID

TEXT-DECORATION-STYLE | DOUBLE

TEXT-DECORATION-STYLE | DOTTED

TEXT-DECORATION-STYLE | DASHED

TEXT-DECORATION-STYLE | WAVY

TEXT-DECORATION-COLOR | COLOR

JS | TEXT-DECORATION-LINE

JS | TEXT-DECORATION-THICKNESS

JS | TEXT-DECORATION-STYLE

JS | TEXT-DECORATION-COLOR

INTERNAL

text-decoration-color

text-decoration-line

text-decoration-skip-ink

text-decoration-style

text-decoration-thickness

EXTERNAL

World Wide Web Consortium (W3C)