search engine optimization articles do it yourself seo hiring search engine experts html and search engine optimization web site analysis and submission service

HTML Optgroup Tutorial

Browser Support

Internet Explorer Firefox Opera Safari Chrome

An option group is used to group related items together under one bold label in a selection list.

Sound confusing?

Take a look at the following demonstration and it will be clear:

Where the list shows "Great Bands" and "Great Bandages" is the start of an optgroup. Here's the code for that list:

<select>
<optgroup label="Great Bands">
<option value="Led Zeppelin">Led Zeppelin</option>
<option value="Steppenwolf">Steppenwolf</option>
</optgroup>
<optgroup label="Great Bandages">
<option value="Band-Aid">Band-Aid</option>
<option value="Curad">Curad</option>
</optgroup>
</select>

The value entered in the label attribute is text that is bolded in the selection list. This forms the start of an optgroup in your list. An optgroup cannot be selected by the user, only the options listed in an optgroup can be selected.

Based on your interest in this tutorial you may also be interested in:

This concludes the HTML Optgroup Tutorial.
Back | HTML Tag Chart | HTML Index | Web Design Tutorials
search engine optimization course
If you want your web site to rank high in the search engines . . . what are you going to do to get it there? Check out my search engine optmization guide, SEO for YOU: Search Engine Optimization for Ordinary Everyday People!

Check out SEO for YOU now!

Almost a Newsletter

Subscribe today for exclusive website design tutorials and grab some free gifts to boot! Learn more, or subcribe below:
Email:

First Name:

Privacy Policy

Did you know...

The member's site has about 100 standards compliant HTML and CSS tutorials, 31 handy reference charts, reprintable content, web graphics, exclusive fonts, free software, free ebooks and more? All this for less than 9 cents a day! [ Details ]
See my fancy bottom! :)