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>).
End tag of option element may be omitted.
All the global attributes are applicable on the <option> element.
Was this article helpful?