How do I remove the underline of HTML hyperlinks? A label to underline the method is here

Source: Internet
Author: User
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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.