HTML 5 DataList

0
951

To apply auto complete feature in input text field DataList is used which is a new HTML5 tag shipped.

HTML5 DataList tag Introduction

As a part of HTML5 specification <datalist> tag has launched. Bu using this tab we can define a list of data and can be used to show list for an input box. Datalist Tag is new in HTML5.

Example

You can use DataList tag to define the list of categories.

Quick Example for DataList Tag:

<input list=”Search Engines”>

<datalist id=”Search Engines”>
<option value=”Google”>
<option value=”Yahoo”>
<option value=”Bing”>
<option value=”Ask”>
<option value=”Baidu”>
</datalist>

Note: With the input box list attribute DataList id attribute must match.

SHARE
Previous articleHTML Elements
Next articleHTML Meta