Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


Dennis Castillo
Dennis Castillo
16,018 Points

Need Help Remember A Simple Code...

Need a help to remember a simple code from one of this tutorial "HTML", I found it very use full but seems my memory is not enough to remember :)

I created a "select" for drop down menu and there is 5 text in it. 1st. one is non-clickable (showing in gray color "Title") and the other 4 text is clickable (hyper link "whatever..."). What is that a simple code for the 1st. text on select drop down menu? this 1st text is for only like a title for 4 text (A title for events...)

Thanks and God Bless...

2 Answers

Spencer Merritt
Spencer Merritt
10,615 Points

The first item in the dropdown box that is greyed out is an "option group" or <optgroup> to describe the following items. it would be coded as:

     <optgroup label="Colors">  <!-- This is the greyed out option group that describes the options -->
          <option>Red</option>  <!-- These are the clickable options -->
          <option>Blue</option>  <!-- These are the clickable options -->
          <option>Green</option>  <!-- These are the clickable options -->
Dennis Castillo
Dennis Castillo
16,018 Points

AHA! option group I remember now it's optgroup tag nice... thanks for your help :D