html Select Tag

In the html <select> tag is used to create a select list and which tag another name is drop-down list . You must give to <option> tag inside of <select> tag to displaying data. 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 if option is true. In the size attribute is used to display number of item when you assign.in the name attributes is used to give name for <select> box and size attributes is use to give size of <select> box.

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