Languages
[Edit]
EN

CSS - underline text

4 points
Created by:
Jan-Alfaro
341

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.

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