Home > Web Front-end > HTML Tutorial > What are the hidden attributes of html

What are the hidden attributes of html

青灯夜游
Release: 2023-01-06 11:14:19
Original
4841 people have browsed it

The hidden attribute of html is "hidden". The hidden attribute specifies that the element is hidden. The tag element with this attribute set will be hidden, that is, it will not be displayed; the syntax format is "<element hidden="hidden">".

What are the hidden attributes of html

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

html is "hidden".

HTML 5 hidden attribute

The hidden attribute specifies that the element is 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.). You can then use JavaScript to remove the hidden attribute, making the element visible.

Grammar

<element hidden="hidden">
Copy after login

Example:

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

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

</body>
</html>
Copy after login

Rendering:

What are the hidden attributes of html

##Recommended tutorial: "

html video tutorial"

The above is the detailed content of What are the hidden attributes of html. 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