Skip to main content

HTML Guide

The “name” attribute on the “option” element is obsolete. Use the “id” attribute instead.

The <option> element no longer accepts a name attribute, which is now obsolete.

Example:

<select id="pet-select">
    <option value="">--Please choose an option--</option>
    <option value="dog">Dog</option>
    <option value="cat">Cat</option>
    <option value="hamster">Hamster</option>
</select>

Learn more:

Related W3C validator issues