HTML - <datalist> Tag


Advertisements


Description

The HTML <datalist> tag specifies set of options for <input> element.

Example

Live Demo
<!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>
   </body>

</html>

This will produce the following result −

Global Attributes

This tag supports all the global attributes described in HTML Attribute Reference

Event Attributes

This tag supports all the event attributes described in HTML Events Reference

Browser Support

Chrome Firefox IE Opera Safari Android
Yes Yes Yes Yes Not Supported Yes

html_tags_reference.htm

Advertisements