Posted on Leave a comment

Today’s basic HTML question

Can <optgroup> be nested within <optgroup>? Is the following example legal?

<select>
   <optgroup label="A">
      <optgroup label="1">
            <option>Outlinepart1</option>
      </optgroup>
   </optgroup>
</select>

Answered! Optgroups may NOT be nested per HTML4 specification.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.