"."/> ".">

Home >Web Front-end >HTML Tutorial >How to use hidden to hide tags in html

How to use hidden to hide tags in html

青灯夜游
青灯夜游Original
2021-06-21 16:28:154842browse

Hidden is a Boolean attribute in the HTML tag. The browser should not display elements that have specified the hidden attribute. Just add the "hidden="hidden"" style to the tag to hide the tag; the specific syntax format is "< ;element hidden="hidden">". <element hidden="hidden">".

How to use hidden to hide tags in html

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

html uses hidden to hide tags

<!DOCTYPE html>
<html>
<head> 
<meta charset="utf-8"> 
</head>
<body>

<p hidden="hidden">这是一段隐藏的段落。</p>
<p>这是一段可见的段落。</p>shuo

</body>
</html>

Rendering:

How to use hidden to hide tags in html

##Description: HTML hidden attribute

The hidden attribute specifies that the element is hidden.

Syntax

<element hidden="hidden">

Hidden elements will not be displayed.

If this attribute is used, the element will be hidden.

The hidden attribute can be set so that users can only see an element when certain conditions are met (such as checking a check box, etc.). Then, JavaScript can be used to delete the hidden attribute to make the element visible .

Recommended tutorial: "

html video tutorial

"

The above is the detailed content of How to use hidden to hide tags in html. 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

Related articles

See more