HTML CSS examples for HTML Tag:input
The list attribute refers to a <datalist> element that contains pre-defined options for an <input> element.
Value | Description |
---|---|
datalist_id | Specifies the id of the datalist to bind the <input> element to |
An <input> element with pre-defined values in a <datalist>:
<!DOCTYPE html> <html> <body> <form action="/action_page.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><!-- www . j ava2 s . com--> </body> </html>