TipueLondon

Home

jQuery

CSS

HTML5

Other

Support

Shop

About & Contact

Native HTML5 autocomplete

Autocomplete sans JavaScript, jQuery or similar

Native HTML5 autocomplete with input list

27th Feb, 2015
This article shows how with the HTML5 input list attribute and datalist element you can easily set up an input box with a custom autocomplete without jQuery, JavaScript or similar.
Example, pasta

How it works

Add the list attribute to an input field and then create a datalist element. The list value should be the same as the datalist id selector.
HTML

Browser compatibility

The datalist element and input list attribute is supported in Chrome 31+, IE10+, Firefox 34+ and Opera 26+. As yet, there's no support in Safari, but input boxes with the list attribute work as standard and datalist is ignored.
© 2016, Tipue. Made in London.
About   Privacy   T&Cs