Html 5 Select Tag

In the htm5 <select> tag is used to create a select list. You must give to <option> tag inside of <select> tag. In the option is used to user can select choose data and <optgroup> element is used to will group to option item.

Autofocus attribute is used to focused cursor when will page load and disabled attribute is used to disabled <select> box when option is true. In the size attribute is used to display number of item when you assign.

Syntax:

<select>
  <option> ... </option>
</select>

Example Code

<html>
<body>
Name Of Car List
  <select>
     <option> Baja </option>
     <option selected="selected"> Arrow </option>
     <option> Bravada </option>
  </select>
<body>
</html>

Out Put:



Name Of Car List

In the above example <select> tag has been added to Name Of Car List.





Content