Home  >  Article  >  Web Front-end  >  html: Usage of optgroup tag, grouped, read-only and displayed in tree style

html: Usage of optgroup tag, grouped, read-only and displayed in tree style

黄舟
黄舟Original
2017-07-03 09:35:481850browse

Usage of optgroup tag in html, Group, read-only and displayed in tree style


in html In addition to the option tag in the select tag, there is another tag called optgroup. What can it do for us?

We have already understood the meaning of connecting points from the name: it is an option group, just like checkboxgroup and radiogurop, it is used for grouping ;    

Look at the following piece of code, open it in a browser and you can see a drop-down menu. But when you choose java or .Net, you can't choose.​​​

And the style is different from that of the option tag, and the font is bold. And the drop-down menu is displayed in a tree-like style.

  
  
      
        optgroup  
          
          
          
    

The above is the detailed content of html: Usage of optgroup tag, grouped, read-only and displayed in tree style. 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