Posted on

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