HomeWeb DesignHTMLSelect Element in HTML: Its Uses, Example

Select Element in HTML: Its Uses, Example

Select Element in HTML: Its Uses, Example

In HTML, it is used to create a drop-down list on a web page. you will use <select> element to create a drop-down list and <option> elements are also used inside <select> element.

Example:

<!DOCTYPE html>
<html>

 <head> 
  <title> Select Element in HTML: PrepareExams
 </head>
  <body>

   Choose City Here:

    <select>
     <option value=> London </option>
     <option value=> Paris </option>
     <option value=> NewYork </option>
     <option value=> Mumbai</option>
   </select>
  
 </body>
</html>

Output Here:

Choose City Here:

- Advertisment -

Latest Articles