Over a million developers have joined DZone.

The New HTML5 Datalist Element

· Web Dev Zone

Start coding today to experience the powerful engine that drives data application’s development, brought to you in partnership with Qlik.

The HTML5 <datalist> element specifies a list of pre-defined options for an <input> element and it works like an “autocomplete” feature for users:
<!DOCTYPE html>

<form action="login.php" method="post">
<input list="username" name="username" />
<datalist id="username">
  <option value="Aaron">
  <option value="Rafael">
  <option value="Cale">
  <option value="Eddie">
  <option value="Valentin">
<input type="password" />
<input type="submit" value="Login" />


And the output will be:

The <datalist> tag is currently supported in Firefox and Opera. We can just hope that other browsers will soon support this great feature.

Create data driven applications in Qlik’s free and easy to use coding environment, brought to you in partnership with Qlik.


Published at DZone with permission of A. Programmer. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}