Menu
Wordpress Tutorials / Wordpress

How to Underline in WordPress

Untitled design 42
Published 17 April 2021

Are you looking to underline text in a WordPress post? Unfortunately, you may have noticed that these buttons were removed from the post editor in a WordPress update- WordPress 4.7. Of course, you can still bold or italicise your text. It is important to note that some website users believe that underlined text represents a link, either to another page on your website or someone else’s. However, depending on your content, underlining a word or sentence can show its importance and help grab your reader’s attention.

In this tutorial I will show you simple ways to underline your text in WordPress.

How to underline text in WordPress

Fortunately, when using the WordPress Gutenberg editor, the underline option has not been completely removed. By using a keyboard shortcut, you can underline the specific text by highlighting it and clicking CTRL + U. If you are using macOS, select CMD + U.

Underline text in wordpress

However, some web browsers do not allow for this method. Instead, you can add CSS code to underline your text. To do this, select the three dots on your block of text and click ‘Edit as HTML’. You can also press CTRL + SHIFT + ALT + M to activate the code editor.

Edit text as html

Next, use the <span> </span> tag to wrap the text that you want to underline. For example, you can add this inline CSS code:

<span style=”text-decoration: underline;”>Put the text you want to underline here</span>

Underline text in wordpress using inline css

Conclusion

This tutorial presented two easy ways to underline in WordPress. If you liked this tutorial, here you can check out some of our other WordPress tutorials.

About Author

Emer has a passion for website development and entrepreneurship, so she is here to give you the information you need to grow your online presence!