tag."/> tag.">
Home > Article > Web Front-end > How to remove the underline of a tag in html
How to remove underline from hyperlinks in HTML: Using CSS: Add a { text-decoration: none; } in the <head> section. Use inline styles: Add style="text-decoration: none;" to the <a> tag.
How to remove the underline of a hyperlink in HTML
In HTML, a hyperlink (< ;a>
tag) usually has a default underscore. To remove underlines, you can use the following methods:
Using CSS
The most common method is to use a CSS style sheet. Add the following CSS rules in the <head>
section:
<code class="css">a { text-decoration: none; }</code>
Use inline styles
You can also use inline styles directly in <a>
Remove underlines from tags:
<code class="html"><a href="#" style="text-decoration: none;">我的超链接</a></code>
Note:
.hover
or .active
can set underlined hyperlinks individually. The above is the detailed content of How to remove the underline of a tag in html. For more information, please follow other related articles on the PHP Chinese website!