"."/> ".">

Home  >  Article  >  Web Front-end  >  How to hide the navigation tag in html5

How to hide the navigation tag in html5

WBOY
WBOYOriginal
2022-01-23 13:41:193453browse

In HTML5, you can use the hidden attribute to hide the navigation tag. The function of this attribute is to hide the specified element. This attribute is a new attribute in HTML5, and the syntax is "

How to hide the navigation tag in html5

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

Navigation of html5 How to hide tags

If you want to hide navigation tags in HTML5, you can use the hidden attribute.

The hidden attribute specifies that the element is hidden.

Hidden elements will not be Display.

If you use this attribute, the element will be hidden.

The hidden attribute can be set so that the user can only see an element when certain conditions are met (such as selecting a check box, etc.). You can then use JavaScript to remove the hidden attribute, making the element visible.

Examples are as follows:




  
  
  
  Document
  


   

Output results when the hidden attribute is not added to the navigation element As follows;

How to hide the navigation tag in html5

After adding the hidden attribute to the navigation bar element, the output result is as follows:

How to hide the navigation tag in html5

Recommended tutorial: "html video tutorial

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