Listing down various options for input values in HTML5

HTMLJavascriptProgramming Scripts

The HTML <datalist> tag specifies set of options for <input> element. You can try to run the following code to list options for input values in HTML5 −

Example

<!DOCTYPE html>
<html>
   <head>
      <title>HTML Datalist Tag</title>
   </head>
   <body>
      <input list = "tutorials" />

      <datalist id = "tutorials">
         <option value = "Java">
         <option value = "ASP">
         <option value = "PHP">
         <option value = "Ruby">
         <option value = "jQuery">
      </datalist>

      <p>Try to add any of the tutorial name mentioned above.</p>
   </body>
</html>
raja
Published on 13-Mar-2018 06:46:54
Advertisements