HTML <datalist> Tag
Description
The <datalist>
HTML element creates a list of options that can be selected when typing in a text field. Initially, this list is hidden and becomes available when the field receives focus or when typing.
Properties
- Permitted Parents
- Any element that accepts phrasing content
- Content
<option>
elements- Start/End Tags
- Start tag: required, End tag: required
Example
Enter an Australian State:<br>
<input list="browsers">
<datalist id="browsers">
<option value="South Australia">
<option value="Western Australia">
<option value="Victoria">
<option value="New South Wales">
<option value="Queensland">
<option value="Tasmania">
</datalist>
Attributes
None
Global Attributes
The <datalist>
tag also supports the Global Attributes in HTML5
Event Attributes
The <datalist>
tag also supports the Event Attributes in HTML5
Browser Support
Desktop | |||||
10 | Yes | 20 | 4 | 9.5 | 12.1 |
Tablets / Mobile | |||||
![]() |
|||||
X | 33 | 4 | X | 12.2 | Yes |
Last updated by CSSPortal on: 6th December 2019
HTML Tags
- a
- abbr
- address
- area
- article
- aside
- audio
- b
- base
- bdi
- bdo
- blockquote
- body
- br
- button
- canvas
- caption
- cite
- code
- col
- colgroup
- comment
- datalist
- dd
- del
- details
- dfn
- dialog
- div
- dl
- doctype
- dt
- em
- embed
- fieldset
- figcaption
- figure
- footer
- form
- h1
- h2
- h3
- h4
- h5
- h6
- head
- header
- hr
- html
- i
- iframe
- img
- input
- ins
- kbd
- keygen
- label
- legend
- li
- link
- map
- mark
- menu
- meta
- meter
- nav
- noscript
- object
- ol
- optgroup
- option
- output
- p
- param
- picture
- pre
- progress
- q
- rp
- rt
- ruby
- s
- samp
- script
- section
- select
- small
- source
- span
- strong
- style
- sub
- summary
- sup
- table
- tbody
- td
- textarea
- tfoot
- th
- thead
- time
- title
- tr
- track
- u
- ul
- var
- video
- wbr