HTML option element
HTML <option> tag defines an option as a child of select or datalist elements.
<p>If you are given a chance to visit one of the following countries,then what will be your choice?</p>
<select>
<option> Germany
<option> Canada
<option> New Zealand
<option> Australia
<option> Egypt
</select>
</>
If you are given a chance to visit one of the following countries,then what will be your choice?
select element offers a list of different options. We select one option out of these options. Here, you can omit the end tag (</option>).
Tag omission
End tag of option element may be omitted.
Global Attributes
All the global attributes are applicable on the <option> element.
Next Previous
Was this article helpful?