ExpertConnect - Mentoring & Discussions

You can join mentoring & discussions for Free Ask Question, Give Answer, Discuss IT Problems, Learn, and Grow

2017-10-20 14:24:55 15

HTML

Hypertext Markup Language is the standard markup language for creating web pages and web applications. With Cascading Style Sheets and JavaScript, it forms a triad of cornerstone technologies for the World Wide Web.

Topic menu

2018-02-20 12:45:43 1
Profile picture of Alex  Stuple
Alex Stuple
Public
Posted: Feb 20, 2018

I am creating a small site (don’t know much about script or programming) and I want to show a dropdown containing multiple values, but I want to categories those values. Is there a way to implement it without any code?

Comment (1) ·  Like (2)
Profile picture of Wajih Qidwai

Wajih Qidwai Feb 20, 2018

you can use <optgroup> in <select> tag like this:
<select>
<optgroup label="US">
                <option value="NY">New York</option>
                <option value="NJ">New Jursey</option>
</optgroup>

<optgroup label="AU">
                <option value="SY">Sydney</option>
                <option value="ML">Melbourne</option>
</optgroup>

</select>

Like (1)

Write a new comment...
Ready to post? select an option: