Knowing how to add an underline your text and knowing how to remove an underline from your text are equally as important skills to have in CSS (the default style rules in every browser give anchor tags an underline, and knowing how to remove this will go a long way in making your pages look more styled). The values that the text-decoration property takes are: none, underline, overline, and line-through…and they’re all pretty self-explanatory. To see some examples, look below:
p{ text-decoration: underline; }
Probably the most commonly used text-decoration property value, “underline” adds a line beneath the text.
p{ text-decoration: overline; }
While you don’t see “overline” very often, it adds a line above the text.
p{ text-decoration: line-through; }
Line-through is a really useful property value that adds a strike through your text.
p{ text-decoration: none; }
Text-decoration: none is the default for most elements and can be used to get rid of any unwanted over, under, or through lines applied to your text.