jump

HTML: The Markup Language

datalistpredefined options for other controls NEW # T

The datalist element represents a set of option elements that represent predefined options for other controls.

Permitted contents #

zero or more option elements, intermixed with phrasing content

Permitted attributes #

global attributes
Any attributes permitted globally.

Tag omission #

A datalist element must have both a start tag and an end tag.

Permitted parent elements #

any element that can contain phrasing elements

Details #

The contents of the datalist element represent fallback content for legacy user agents, intermixed with option elements that represent the predefined options.

DOM interface #

interface HTMLDataListElement : HTMLElement {
  readonly attribute HTMLCollection options;
};