Edited the tag and body, to make it clear for newbies ..
Is there anyway (in CSS) to avoid the underline for the text and links introduced in the page .. ?
Edited the tag and body, to make it clear for newbies ..
Is there anyway (in CSS) to avoid the underline for the text and links introduced in the page .. ?
Use CSS to remove text-decoration
s.
a {
text-decoration: none;
}
Use CSS. This will remove all underlines from your page:
body {
text-decoration: none !important;
}
You can also do it on selected elements:
a, u {
text-decoration: none;
}
To provide another perspective to the problem (as inferred from the title/contents of the original post):
If you want to track down what is creating rogue underlines in your HTML, use a debugging tool. There are plenty to choose from:
For Firefox there is FireBug;
For Opera there is Dragonfly (called "Developer tools" in the Tools->Advanced menu; comes with Opera by default);
For IE there is the "Internet Explorer Developer Toolbar", which is a separate download for IE7 and below, and is integrated in IE8 (hit F12).
I've no idea about Safari, Chrome and other minority browsers, but you should probably have at least one of the three above on your machine anyway.
Don't forget to either include stylesheets using the link tag
http://www.w3schools.com/TAGS/tag_link.asp
Or enclose CSS within a style tag on your webpage.
<style>
a { text-decoration:none; }
p { text-decoration:underline; }
</style>
I wouldn't recommend using the underline on anything apart from links, underline is generally accepted as something that is clickable. If it isn't clickable don't underline it.
CSS basics can be picked up at w3schools
<u>
is a deprecated tag.
Use...
<span class="underline">My text</span>
with a CSS file containing...
span.underline
{
text-decoration: underline;
}
or just...
<span style="text-decoration:underline">My Text</span>