html
html

Reputation:

Not Underlined link in HTML

How to get a link not underlined in HTML?

Upvotes: 3

Views: 3112

Answers (6)

Jayx
Jayx

Reputation: 3966

As everyone above said, but I wouldn't use inline styles.

Rather set a class for all links that you do not wish to have underlined.

<a href=#" class="nolines">Your link</a>

CSS:

a.nolines{text-decoration:none;}

Upvotes: 2

Sachin Gaur
Sachin Gaur

Reputation: 13099

It can be done in following ways:
1) If you want to remove underline from specific link, then use

<a href="#" style="text-decoration:none;">Some text</a>

2) To remove the underline from entire html page, Create a .css file, In that write following:

a { text-decoration: none; }

It will suppress underline from every anchor tag.

Upvotes: 7

nickf
nickf

Reputation: 546005

Just guessing at what your next question would be....

a {
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

Upvotes: 4

mdm
mdm

Reputation: 5574

Using CSS. The property you need to set is text-decoration: none;

Upvotes: 1

ajma
ajma

Reputation: 12206

for one link, use style="text-decoration:none"

if you want it for the whole site:

<style> a { text-decoration:none; } </style>

Upvotes: 1

Henrik Paul
Henrik Paul

Reputation: 67703

You'll probably want to do that in CSS.

a {
  text-decoration: none;
}

Or, as an inline style:

<a href="http://foo.bar/something" style="text-decoration:none">link</a>

Upvotes: 1

Related Questions