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

How to hide tags in html5

青灯夜游
Release: 2021-11-18 13:56:43
Original
5476 people have browsed it

In HTML5, you can hide a specified tag by adding the hidden attribute to the tag. The hidden attribute is a Boolean attribute. The browser will not display tag elements that have the hidden attribute set; the syntax "

How to hide tags in html5

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

In html5 , if you want to hide a label, you can add the hidden attribute to the label.

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

Output result:


How to hide tags in html5##Description:

hidden attribute specifies that the element is hidden, it is a Boolean attribute.

If the hidden attribute is set, it specifies that the element is still or no longer relevant.

The browser should not display that hidden is specified attribute. The

hidden attribute can also be used to prevent the user from viewing an element until certain conditions are matched (such as a checkbox being selected). JavaScript can then remove the hidden attribute to make the element visible.

Recommended tutorial: "

html video tutorial

"

The above is the detailed content of How to hide tags 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