Skip to navigation

HTML Tag: option

Option in a selection form control (select) or data list (datalist).

The value of a selected option will be its textual content, unless an alternative value is explicitly applied with the value attribute.

Optional Attributes

Attribute Description Possible values
value An explicit value that would otherwise be the content of the element. Text.
selected Automatically sets the element to be the selected option. Should only be used with one option element in any given select. None.
label A user-visible label that will otherwise be the textual content of the element. Text.
disabled Renders the option non-selectable. None.
Global attributes


<form action="dogselecta.php">
    <select name="dog">
        <option>Arctic Fox</option>
        <option>Maned Wolf</option>
        <option>Grey Wolf</option>
        <option>Red Fox</option>
        <option value="pooch" selected>Domestic Dog</option>

    <select name="cat">
        <option label="Caracal" value="Caracal caracal"></option>
        <option label="Clouded leopard" value="Neofelis nebulosa"></option>
        <option label="Fishing cat" value="Prionailurus viverrinus"></option>
        <option label="Marbled cat" value="Pardofelis marmorata"></option>
        <option label="Serval" value="Leptailurus serval"></option>
        <option label="Ocelot" value="Leopardus pardalis"></option>

    <input type="submit">