HTML select tag

Html <select> tag element represents different options in the form of drop down list. One option is selected from this list of options.

Example

<p>If you are given a chance to visit one of the following countries,then what will be your choice?</p>
 <select>
  <option>Australia
  <option>Egypt
  <option>Algeria
  <option>Indonesia
 </select>
Try </>

Related tags

TagsDescription
<option> represents an option as a part of the options list.
<select> <option> </option> </select>

Tag omission

Both starting and ending tags are necessary for the select element.

Global Attributes

All the global attributes are applicable on the select element.



Was this article helpful?

 

Email:

Message:

Get the newsletter