Using CSS, you can change the style of your HTML links to not have an underline using any of the following recommendations.
Make all links not underlined
To make all of the links on your web page not have underlines, configure the text-decoration style of the a (anchor) element. For instance, you can add the following CSS code between the
tags of your web page’s HTML code. Here, the...The code above tells the browser to have no type of underline (text-decoration) on any tags (links).
Make an individual link not have an underline
If you want only one link not to be underlined on your web page, you can create a link similar to the code below. You can do so anywhere in the
tag to make the link not have an underline.Adding this code to a CSS file instead of in the HTML head section makes all web pages that use the CSS file to set links with no underline.
Defining a style property this way is called inline styling. The style is specified “inline,” in the element itself, in the body of your page.
The non-underlined link appears like this on your web page:
Computer Hope.
Related information
- How to change the color of links on a web page.
- See our hyperlink and underline definitions for further information and related links.
- HTML and web design help and support.