<datalist>

  • Revision slug: HTML/Element/datalist
  • Revision title: datalist
  • Revision id: 21459
  • Created:
  • Creator: teoli
  • Is current revision? No
  • Comment 1 words added

Revision Content

{{ HTMLVersionHeader("5") }}{{ gecko_minversion_header("2") }}

The HTML Datalist Element (<datalist>) contains a set of {{ HTMLElement("option") }} elements that represent the possible options for the value of other controls.

Permittent content phrasing content or zero or more {{ HTMLElement("option") }} elements
Tag omission none, both the start tag and the end tag are mandatory
Permitted parent elements any element that accept phrasing content.
Normative document HTML5, section 4.10.10

Attributes

This element has no other attributes than the global attributes, common to all elements.

DOM Interface

This element implements the HTMLDataListElement interface.

See also

  • The {{ HTMLElement("input") }} element, and more specially its {{ htmlattrxref("list", "input") }} attribute;
  • The {{ HTMLElement("option") }} element.

Revision Source

<p>{{ HTMLVersionHeader("5") }}{{ gecko_minversion_header("2") }}</p>
<p>The <em>HTML Datalist Element</em> (<span style="font-family: Courier New;">&lt;datalist&gt;</span>) contains a set of {{ HTMLElement("option") }} elements that represent the possible options for the value of other controls.</p>
<table class="fullwidth-table" style="width: 1125px; height: 117px;"> <tbody> <tr> <td>Permittent content</td> <td>phrasing content or zero or more {{ HTMLElement("option") }} elements</td> </tr> <tr> <td>Tag omission</td> <td>none, both the <span title="syntax-start-tag">start tag</span> and the <span title="syntax-end-tag">end tag</span> are mandatory</td> </tr> <tr> <td>Permitted parent elements</td> <td> any element that accept phrasing content. </td> </tr> <tr> <td>Normative document</td> <td><a class=" external" href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#the-datalist-element" rel="external nofollow" target="_blank" title="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#the-datalist-element">HTML5, section 4.10.10</a></td> </tr> </tbody>
</table>
<h3>Attributes</h3>
<p>This element has no other attributes than the <a class="new " href="/en/HTML/global_attributes" rel="internal" title="en/HTML/global attributes">global attributes</a>, common to all elements.</p>
<div id="section_3">
<div id="section_3">
<h3 class="editable">DOM Interface</h3>
<p>This element implements the <code><a href="/en/DOM/HTMLDataListElement" title="en/DOM/HTMLDataListElement">HTMLDataListElement</a></code> interface.</p>
<h3>See also</h3>
<ul> <li class="last">The {{ HTMLElement("input") }} element, and more specially its {{ htmlattrxref("list", "input") }} attribute;</li> <li class="last">The {{ HTMLElement("option") }} element.</li>
</ul></div>
</div>
Revert to this revision