Is it possible to create option groups within a dropdown?

  • Profile Image
    Asked on February 01, 2017 at 05:48 PM

    Is there a way to create an option group subheading and indented sub-selections in a dropdown list?


    In HTML it would look like this:

                    <optgroup label="Crime Prevention">

                           <option value="Central">Crime Prevention: Central Division-</option>

                           <option value="Foothill">Crime Prevention: Foothill Division-</option>

                           <option value="Southern">Crime Prevention: Southern Division-</option>

                           <option value="Western">Crime Prevention: Western Division-</option>                       



  • Profile Image
    Answered on February 01, 2017 at 08:20 PM

    Yes, that's possible. 

    To create a group, enclose the text with double square brackets.



    option 1

    option 2