What is the syntax to hide elements in html5

青灯夜游
Release: 2021-12-17 11:57:11
Original
1746 people have browsed it

The syntax for hiding elements in HTML5 is "name>". You only need to set the hidden attribute for the specified element tag to make it Hidden, and hidden elements will not be displayed by the browser.

What is the syntax to hide elements in html5

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

In html5, you can use the hidden attribute to hide elements.

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.

Syntax format:

<元素名 hidden="hidden">...</元素名>
Copy after login

The hidden attribute is a global attribute that can be used to configure behaviors common to all elements and can be used on any element.

Example:

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

What is the syntax to hide elements in html5

Description: The hidden attribute can be set so that users can only see an element when certain conditions are met. (like checking a checkbox, etc.). You can then use JavaScript to remove the hidden attribute, making the element visible.

Related recommendations: "html video tutorial"

The above is the detailed content of What is the syntax to hide elements 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