The <option> tag in HTML is used to create a list of options within elements like <select> and <datalist>. This tag allows the user to select one or multiple values from the list of options.
Syntax
<option value="giá_trị">nội_dung</option>
Where:
Example
<select>
<option value="apple">Táo</option>
<option value="banana">Chuối</option>
<option value="orange"></option>
</select>
Result
In the example above, we create a list of options with three choices: "Apple", "Banana", and "Orange". When the user selects an option, the corresponding value will be sent to the server.
In addition, the <option> tag also supports some other attributes such as selected (to select a default option), disabled (to disable an option), and label (to display a label for the option).