Attributes · <datalist>
Which HTML datalist attributes matter?
These attributes decide how the <datalist> behaves and what actually gets emailed to your inbox when someone submits.
| Attribute | What it does | Docs |
|---|---|---|
list | Goes on the <input> and holds the id of the <datalist> whose options are suggested. | MDN |
id | Goes on the <datalist>. The input's list attribute must match it exactly. | MDN |
value | Goes on each <option>. This is the text that fills the input when the suggestion is picked, and so the text that gets sent. | MDN |
label | Optional extra text on an <option>. Some browsers show it next to or instead of the value; it is never sent. | MDN |




