This article is about the use of HTML hyperlinks to remove the underline, teach you how to quickly remove the HTML hyperlink underline method, and finally the relevant code explanation, let's take a look at this article together
First, we use the basic CSS style to do the simplest way to underline:
HTML a hyperlink tag, the default browser is underlined, some are not underlined, most anchor text hyperlinks a label font is underlined, how to remove the hyperlink underline? HTML Hyperlinks How do I remove underscores?
Removing the underline that removes the hyperlink anchor text requires CSS style properties:
Text-decoration
Most of the time we know that Text-decoration:underline is showing underscores.
Remove the A tag hyperlink underline code in HTML:
Text-decoration:nonea{text-decoration:none}
This removes the hyperlink underline effect in the Web page. If you set this CSS code only, you also remove the underline when hovering over the hyperlink, and the underline does not appear.
Avoid compatibility issues, if you want to hover over the hyperlink is not realistic underline, but also need the CSS code as follows:
A:hover{text-decoration:none}
The mouse moves over the hyperlink without underlining.
Complete HTML Remove hyperlink underline-html Hyperlink underline strip code:
a{Text-decoration:none} a:hover{Text-decoration:none}
Take a look at the full code example:
<! DOCTYPE html>
Let's take a look at this in the browser:
The above figure is not very clear, originally in topic.alibabacloud.com there is an underscore, and now there is no, this is not a lot of convenience.
There are also the following code for underlining, which you might need:
1.html hyperlinks are underlined by default, and hover stop lines disappear
a{text-decoration:underline} a:hover{Text-decoration:none}
2.html remove underline by default, hover to display underline
a{Text-decoration:none} a:hover{Text-decoration:underline}
This is the HTML hyperlink to the cancellation of the underline method, there are some related code, guess you may need to, have the problem of welcome to ask questions below.