Element content". You only need to set the hidden attribute for the specified element tag to hide it, and the hidden elements will not be browsed. The device is displayed."/> Element content". You only need to set the hidden attribute for the specified element tag to hide it, and the hidden elements will not be browsed. The device is displayed.">

Home>Article>Web Front-end> What is the syntax to hide elements in html5

What is the syntax to hide elements in html5

青灯夜游
青灯夜游 Original
2021-12-17 11:57:11 1629browse

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">...

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:

这是一段可见的段落。

这是一段可见的段落。

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!

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