{"id":14108,"date":"2011-09-06T18:43:06","date_gmt":"2011-09-07T01:43:06","guid":{"rendered":"http:\/\/css-tricks.com\/?page_id=14108"},"modified":"2021-08-02T10:54:53","modified_gmt":"2021-08-02T17:54:53","slug":"text-decoration","status":"publish","type":"page","link":"https:\/\/css-tricks.com\/almanac\/properties\/t\/text-decoration\/","title":{"rendered":"text-decoration"},"content":{"rendered":"\n

The text-decoration<\/code> property adds an underline, overline, line-through, or a combination of lines to selected text.<\/p>\n\n\n\n

h3 {\n  text-decoration: underline;\n}<\/code><\/pre>\n\n\n

Values<\/h3>\n\n\n
  • none<\/code>: no line is drawn, and any existing decoration is removed.<\/li>
  • underline<\/code>: draws a 1px line across the text at its baseline.<\/li>
  • line-through<\/code>: draws a 1px line across the text at its “middle” point.<\/li>
  • overline<\/code>: draws a 1px line across the text, directly above its “top” point.<\/li>
  • inherit<\/code>: inherits the decoration of the parent.<\/li><\/ul>\n\n\n\n

    The blink<\/code> value is in the W3C spec, but it is deprecated and will not work in any current browser. When it worked, it made the text appear to “blink” by rapidly toggling it between 0% and 100% opacity.<\/p>\n\n\n

    Demo<\/h3>\n\n\n