Content categories: Flow content, phrasing content. While using this site, you agree to have read and accepted our ... Get the latest and greatest from MDN delivered straight to your inbox. L'Element HTML Datalist (
Get it now → Type: block Self-closing: No Permalink Share Can I use MDN # datalist Defines a list of autocomplete options when using a text . You can access a
The
Examples might be simplified to improve reading and basic understanding. : Tag omission: None, both the starting and ending tag are mandatory. The source for this interactive example is stored in a GitHub repository. If you haven’t already created an account, you will be prompted to do so after signing in. Users will see a drop-down list of pre-defined options as they input data. Definition and Usage. The
Citing from MDN “Styling HTML forms – the ugly”: Some elements simply can't be styled using CSS. The HTML datalist element contains a set of option elements that represent the permissible or recommended options available to choose from within other controls. The Datalist object represents an HTML
Include this polyfill to provide support for older and currently incompatible browsers:Get the latest and greatest from MDN delivered straight to your inbox.The newsletter is offered in English only at the moment. W3Schools is optimized for learning, testing, and training. html.Datalist is a dash_html_components component. See CodePen example.
The
A datalist with pre-defined options (connected to an element):The numbers in the table specify the first browser version that fully supports the element.If you want to report an error, or if you want to make a suggestion, do not hesitate to send us an e-mail: Official examples and reference documentation for html.Datalist.
Tutorials, references, and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. The datalist tag is one of my favorite HTML tags and something I've blogged about a few times in the past.
: Permitted content: Either phrasing content or zero or more
Sign in to enjoy the benefits of an MDN account. : Permitted ARIA roles Access a Datalist Object. A