Home Menu

text-decoration

The text-decoration CSS 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)

JesusBible
HTMLCSSJSPHPSVGMore
AboutTerms