How to Underline Text using CSS? Last Updated : 14 Nov, 2024 Summarize Comments Improve Suggest changes Share Like Article Like Report To underline a text using CSS, the CSS text-decoration property is used with the value set to underline.Using text-decorationWe use the text-decoration CSS property to underline a text using CSS. The text that is to be underlined is inserted in a <p> tag and the property is applied.Syntaxtext-decoration: underline; HTML <h1>Underlining Text using text-decoration property</h1> <p> GeeksforGeeks shows the <b style="text-decoration: underline;"> Underlined part </b>using CSS </p> Outputunderlined-textExample: Another example display underline text with text-decoration property. HTML <h1>Underlining Text using text-decoration property</h1> <p style="text-decoration: underline;"> This content is underlined using Text Decoration property </p> Outputunderlined-text Comment More infoAdvertise with us Next Article How to Underline Text using CSS? Y yuvrajghule281 Follow Improve Article Tags : Web Technologies CSS Similar Reads How to create Underline Input Text Field using CSS ? Input Text Field can be underlined by implementing different approaches to applying a bottom border to an input text field, using various methods such as HTML and CSS. Styling input text fields is a crucial aspect of web development, and adding a bottom border is a common way to enhance the visual a 2 min read How to remove underline from a:before using CSS ? The a:before is used to create an element before the content of the anchor tag and it displays underlined a:before part by default. To remove the underline from a:before using the text-decoration property of CSS and set element display to inline-block. Syntax: text-decoration:none; display:inline-bl 2 min read How to remove underline for anchors tag using CSS? The anchor tag (<a>) is used to define hyperlinks in HTML, Removing the underline from the anchor (<a>) tags in CSS involves setting the text-decoration property to none. This can be done by targeting the anchor elements with a CSS rule like a { text-decoration: none; }, which removes th 2 min read How to Underline Text in HTML? Here are two methods to underline text in HTML.1. Underlining text using <u> TagThe <u> tag is used to underline text content. It wraps the content to be underlined with a horizontal line beneath it. This tag is commonly used for hyperlinks or emphasized text.Syntax<u> Underlined T 1 min read How to underline all words of a text using jQuery? To underline all words of a text using jQuery, you can wrap each word in a <span> tag and apply the CSS text-decoration property. This approach allows for individual styling of each word within a text element. ApproachCreate a basic structure for the web page. The CSS rule p span text-decorati 2 min read Like