Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Removing underline with href attribute [duplicate]

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.

like image 664
Victor Mukherjee Avatar asked Sep 21 '12 09:09

Victor Mukherjee


People also ask

How do I stop hyperlink underline?

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.

How do I remove the underline from a tag in CSS?

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.

How do I get rid of the blue underline in HTML?

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.


1 Answers

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;    } 
like image 196
Curtis Avatar answered Sep 20 '22 10:09

Curtis