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.
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?
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>
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>