How to remove the underline for anchors(links)?

Steven picture Steven · Jan 11, 2010 · Viewed 523.5k times · Source

Is there anyway (in CSS) to avoid the underline for the text and links introduced in the page .. ?

Answer

Emil Vikström picture Emil Vikström · Jan 11, 2010

Use CSS. this removes underlines from a and u elements:

a, u {
    text-decoration: none;
}

Sometimes you need to override other styles for elements, in which case you can use the !important modifier on your rule:

a {
    text-decoration: none !important;
}