Autocomplete in HTML5

The <datalist> provides autocomplete feature on input element. It  specifies the predefined values for an input tag. We see the dropdownlist as per the data we decided. It supports only Firefox and Opera browsers.


<!DOCTYPE html>

<html>

<body>

<form>

<input list="Students" name="DPS" />

<datalist id="Students">

  <option value="Ram">

  <option value="Mahak">

  <option value="Kajal">

  <option value="Pihu">

</datalist>

</form>

</body>

</html>


1.png

Ebook Download
View all
Learn
View all