HTML <option> Element Reference

The HTML <option> element defines one selectable choice in a select, datalist, or compatible control.

<option>

HTML <option> Element Reference

The HTML <option> element defines one selectable choice in a select, datalist, or compatible control.

Categories

  • Forms

Tag omission

Consult the HTML Living Standard for the precise tag-omission rules.

Content model

  • Detailed content-model guidance will be added to this reference.

Attributes

Examples

Example

A practical option element example.

<select name="theme">
  <option value="light">Light</option>
  <option value="dark">Dark</option>
</select>

Related references

Description

The HTML <option> element defines one selectable choice in a select, datalist, or compatible control.

References

  1. HTML Living Standard: Index of elements
  2. MDN: HTML <option> Element

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies