CSS – Underline Text

To underline text of HTML Element(s) using CSS, set CSS text-decoration property for this HTML Element(s) with underline.

text-decoration: underline;

Underline Heading

In the following example, we underline text of heading <h1> element.

Example

ADVERTISEMENT

Underline Paragraph

In the following example, we underline text of paragraph <p> element.

Example

References

CSS text-decoration

Conclusion

In this CSS Tutorial, we learned how to remove underline for anchor element using CSS.