The html5 tutorials

 
About HTML5
Home
Introduction to HTML5
Features of HTML5
Older versions Vs. HTML5
 
Tags  
source
article
aside
audio
canvas
command
datalist
details
embed
figcaption
figure
footer
header
hgroup
keygen
mark
meter
nav
output
progress
ruby
section
summary
time
video
wbr
 

The <datalist> Tag

The <datalist> tag is used to list a set of data to be used in a list of options like autocomplete feature used in forms.

This feature has to be used along with the input element, so as to include which values the input element should have. This option would not be shown on the page as the datalist tag is used to check if the input values are valid or not.

Example code:

<html>
  <body>
    <input list="Cellphones" />
      <datalist id=" Cellphones ">
        <option value="BENQ">
        <option value="BLACKBERRY">
        <option value="ERICCSSON">
        <option value="FLY">
        <option value="HTC">
      </datalist>
  </body>
</html>