Home > Web Front-end > Front-end Q&A > How to remove underline from a tag in html5

How to remove underline from a tag in html5

青灯夜游
Release: 2022-03-11 18:33:13
Original
7121 people have browsed it

In HTML5, you can use the style attribute to add a text-decoration style to the a tag to remove the underline. The syntax is ".. .”.

How to remove underline from a tag in html5

The operating environment of this tutorial: Windows 7 system, HTML5 version, Dell G3 computer.

HTML a tag

HTML uses the tag to set up hypertext links (referred to as "hyperlinks"), used to link from one page to another page. The

tag is underlined by default:

How to remove underline from a tag in html5

## can be deleted by adding the

text-decoration style to the a tag Underline.

The text-decoration attribute specifies the modifications added to the text, such as underline, overline, strikethrough, etc.; when the value of this attribute is set to "none", it means that standard text is defined and no text decoration is added. .

Using this attribute value, we can remove styles that already have underline, strikethrough, or topline.

Example:


<a href="#">a标签,默认有下划线</a><br>
<a href="#" style="text-decoration: none;">a标签,去掉下划线</a>
Copy after login

How to remove underline from a tag in html5

[Related recommendations:

html video tutorial, web front-end]

The above is the detailed content of How to remove underline from a tag in html5. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template