"."/> ".">

Home >Web Front-end >Front-end Q&A >What does datalist of html5 mean?

What does datalist of html5 mean?

WBOY
WBOYOriginal
2021-12-21 10:02:092724browse

html5's datalist means "option list". The datalist tag is used to specify the possible option list of the input element. As the predefined value of the input element, the syntax is "< ;option>".

What does datalist of html5 mean?

The operating environment of this tutorial: Windows 10 system, HTML5 version, Dell G3 computer.

What does the datalist of html5 mean?

The datalist tag in html5 specifies a list of possible options for the element.

The tag is used to provide "auto-complete" features for the element. The user will see a drop-down list with predefined options that will serve as the user's input data.

Please use the list attribute of the element to bind the element. The datalist and its options are not displayed, it is just a list of valid input values.

The example is as follows:

<html>
<head> 
<meta charset="utf-8"> 
<title>123</title> 
</head>
<body>
<form action="demo-form.php" method="get">
<input list="browsers" name="browser">
<datalist id="browsers">
  <option value="Internet Explorer">
  <option value="Firefox">
  <option value="Chrome">
  <option value="Opera">
  <option value="Safari">
</datalist>
<input type="submit">
</form>
<p><strong>注意:</strong> Internet Explorer 9(更早 IE 版本),Safari 不支持 datalist 标签。</p>
</body>
</html>

Output result:

What does datalist of html5 mean?

##Recommended tutorial: "

html video tutorial

The above is the detailed content of What does datalist of html5 mean?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn