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


Nathaniel Simone
Nathaniel Simone
4,608 Points

Why don't radio buttons use a syntax similar to lists or drop down menus?

HTML uses a common syntax for things like lists and drop down menus.

For example:




Is there a reason radio buttons don't use a similar syntax?

Something like


It seems like it would fit HTML's typical syntax better, but maybe I'm missing something.


1 Answer

<optgroup label="web"> <option value="frontend_developer">Frontend Developer</option> <option value="php_developer">PHP Developer</option> <option value="python_developer">Python Developer</option> <option value="rails_developer">Rail Developer</option> <option value="web_designer">Web Designer</option> <option value="wordpress_developer">Wordpress Developer</option> </optgroup>