<option> tag in HTML
The <option> tag represents an option in a <select> tag or in a <datalist> tag.
The behavior of this element varies slightly according to, in which of these two elements it's present on.
Example 1 - Under the <select> tag
Example 2 - Under the <datalist> tag
selected attribute in <option> tag
selected attribute is used to set a value as a default in the dropdown list box.
In the above example Mango will be selected by default.
disabled attribute in <option> tag
This attribute is used to disable the value in the dropdown list box.
In the above example, you cannot to select the Mango option.
value attribute in <option> tag
This attribute is used to assign a unique value to each list items.
If you feel this difficult to understand leave it, we will see it in upcoming chapters.