Possible Duplicate:
How to remove the underline for anchors(links)?
In the following code below, the link gets underlined when I use the href attribute.
<html> <body> <a href="xxx.html">goto this link</a> </body> </html>
I want the link to be associated with that tag, but not to be underlined. How can I do that? Thanks in advance for your help.
Remove the Underline From a Single HyperlinkIn the context menu, click “Font.” The “Font” window will appear. In the “Font” tab, click the down arrow under the “Underline Style” option. Click “None” in the drop-down menu, then select the “OK” button.
To finally remove the default underline of the link, you can target all the pseudo-classes and assign them a text-decoration property of none . You can play with the 4 pseudo-classes of the link tag with this pen: HTML. CSS.
Set red color to the text using the hex code #FF0000 . Then, set the text-decoration property to none . The CSS below will set the text Next Page to red which is a hyperlink. The text-decoration property, which is set to none , will remove the underline and blue color of the element of the anchor tag.
Add a style with the attribute text-decoration:none;
:
There are a number of different ways of doing this.
Inline style:
<a href="xxx.html" style="text-decoration:none;">goto this link</a>
Inline stylesheet:
<html> <head> <style type="text/css"> a { text-decoration:none; } </style> </head> <body> <a href="xxx.html">goto this link</a> </body> </html>
External stylesheet:
<html> <head> <link rel="Stylesheet" href="stylesheet.css" /> </head> <body> <a href="xxx.html">goto this link</a> </body> </html>
stylesheet.css:
a { text-decoration:none; }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With