Remove the Underline Under the Links in HTML/CSS

By default, HTML hyperlinks are underlined. However, if you wish to deactivate this feature and display your hyperlinks as non-underlined text, you can do so using the CSS. This article will walk you through the necessary steps.

To remove the underline from HTML links, simply enter the following code in the CSS:

aounderline:link

{

text-decoration:none;

}

N.B. Pseudo-class: link allows you to target only the hyperlinks () and anchors () and is not compulsory.

If you want the style to apply to particular links, simply define a specific class for links that you wish not to be underlined. You may do so using the following code:

aounderline: link

(

Text-decoration: none;

)

style>

aounderline:link

{

text-decoration:none;

}

Finally, if you do not want to define a style sheet, you can simply set the style online with the following style attribute:

Text of link

Image: © 123rom

Hunter Jones

Hunter Jones

Next Post

Leave a Reply

Your email address will not be published. Required fields are marked *