Nested <optgroup>s are no longer allowed

Published: | Categories: HTML, DOM


According to the HTML5 spec, nested <optgroup> elements are not valid. Firefox now obeys the spec, so an <option> element put under programmatically nested <optgroup> elements is no longer a member of the topmost <select> element. That means the <option> cannot be selected and it won’t appear in the options DOM property of the <select>.