Get the App
SLTechnology News&Howtos  ›  Development  › 

How html hides option

Shulou Source: shulou.com Published: 2022-06-02 09:15:04 10月02日 Update

This article is about how html hides option. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Method: 1, set hidden attribute to option tag, syntax ""; 2, add "display:none" style to option tag; 3, add "visibility:hidden" style to option tag.

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

Method 1: set the hidden attribute to the option tag

Browsers should not display elements that have a hidden attribute specified.

Default-what fruit do you like, apple, pear, peach, banana

Method 2: add a "display:none" style to the option tag

Default-what fruit do you like, apple, pear, peach, banana

Method 3: add a "visibility:hidden" style to the option tag

Default-what fruit do you like, apple, pear, peach, banana

Thank you for reading! This is the end of this article on "how html hides option". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it out for more people to see!

Tags: Tags methods styles attributes peaches pears fruits apples bananas content more articles good practical elements tutorials articles browsers environment computer Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Docker Apple Shulou Information MySQL