Attribute: List

The list attribute refers to a <datalist> element that contains pre-defined options for an <input> element:

HTML file: Displayed by browser:
<input list="browsers">

<datalist id="browsers">
  <option value="Internet Explorer">
  <option value="Firefox">
  <option value="Chrome">
  <option value="Opera">
  <option value="Safari">
</datalist>

This should work with all major browsers, except Safari.

Back button Table of Contents Next button