Uncommon HTML elements: optgroup and html element optgroup

Source: Internet
Author: User

Uncommon HTML elements: optgroup and html element optgroup

In a webpage form,<Optgroup>Element is used in<Select>Create a group of options in the element<Option>. This can better differentiate the differences between each group of options.

This element contains two attributes:DisabledAndLabel.

Disabled: indicates that the quota group cannot be selected.

1 <select> 2 <optgroup label = "Group 1"> 3 <option> Option 1.1 </option> 4 </optgroup> 5 <optgroup label = "Group 2"> 6 <option> Option 2.1 </option> 7 <option> Option 2.2 </option> 8 </optgroup> 9 <optgroup label = "Group 3" disabled> 10 <option> Option 3.1 </option> 11 <option> Option 3.2 </option> 12 <option> Option 3.3 </option> 13 </optgroup> 14 </select>

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.