Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove the underline for anchors(links)?

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

like image 868
Steven Avatar asked Jan 11 '10 11:01

Steven


People also ask

How do I remove an underline?

Use Keyboard ShortcutsPress "Ctrl-U" on your computer's keyboard to remove the underline from your selected text. This quickly reformats one underlined word, phrase or section in your document.

How do you make text not underlined in a link?

You can do so anywhere in the <body></body> tag to make the link not have an underline. Defining a style property this way is called inline styling. The style is specified "inline," in the element itself, in the body of your page.

How do I remove the underline from a link in react?

Use inline styles to remove the underline of a Link in React, e.g. <Link style={{textDecoration: 'none'}} to="/"> . When the text decoration property is set to none , the underline of the link is removed.


2 Answers

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; } 
like image 196
Emil Vikström Avatar answered Sep 18 '22 13:09

Emil Vikström


The css is

text-decoration: none; 

and

text-decoration: underline; 
like image 23
DanDan Avatar answered Sep 20 '22 13:09

DanDan