Languages
[Edit]
EN

CSS - underline text

4 points
Created by:
Jan-Alfaro
681

In this short article we would like to show how to create underline text with CSS only.

The style property that makes underline effect on text is text-decoration: underline;.

Practical example:

// ONLINE-RUNNER:browser;

<!doctype html>
<html>
<head>
  <style>

    span {
        text-decoration: underline;
    }

  </style>
</head>
<body>
  <p>Some text with <span>underline</span> element.</p>
</body>
</html>

Note:

You can also use the HTML solution from the following article: HTML - underline text.

Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

CSS

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join