Fandom

HTML & CSS Wiki

Text-decoration

649pages on
this wiki
Add New Page
Comments0 Share

The text-decoration property is used in CSS and certain HTML elements. It renders a certain kind of effect to the text.

Values

  • none - Renders no text decoration.
  • underline - Renders a line underneath each line of text.
  • overline - Renders a line above each line of text.
  • line-through - Renders a line through the middle of each line of text.
  • blink - Renders blinking (flashing) text. Internet Explorer and Safari ignore this value, but Mozilla Firefox and Opera do not.

One or more values can be used be separating them with a space.


To apply this in HTML, use:

<span style="text-decoration:overline;">Decorated text.</span>

That produces: Decorated text.


This is text with all the values applied: Decorated text.


To apply this in CSS, in the h1 element for example, use:

h1 {
     text-decoration:underline overline line-through blink;
}


Image example:

Text-decoration

text-decoration in Firefox 3.6.10

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.