"."/> ".">

Home >Web Front-end >HTML Tutorial >How to hide underline in html5

How to hide underline in html5

WBOY
WBOYOriginal
2021-11-25 09:53:115036browse

In HTML, you can use the style attribute to add the "text-decoration:none;" style to the element to set the element to hide the underline. The syntax is " ".

How to hide underline in html5

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

html5How to hide the underline

In html, you can set the style attribute of the element and add the "text-decoration:none" style to the element You can hide the underline of the element.

Let’s take the a tag as an example to see how to hide the underline of the a tag. The example is as follows:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
<a href="https://www.php.cn/" target="_blank" style="text-decoration: none;">这是一个a标签</a>
</body>
</html>

Output result:

How to hide underline in html5

In the above example, using the style attribute to add the "text-decoration: none" style to the element can hide the underline of the element.

Recommended tutorial: "html video tutorial"

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

Statement:
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