Which HTML5 element provides a list of predefined values to assist user input?

Prepare for the uCertify CIW Advanced HTML5 and CSS3 Specialist Exam. Dive into essential topics with flashcards and multiple-choice questions. Enhance your understanding with hints and explanations for each question. Pass your exam confidently!

Multiple Choice

Which HTML5 element provides a list of predefined values to assist user input?

Providing input suggestions from a predefined set is handled by the datalist element. It defines a list of possible values and is linked to an input via the input’s list attribute, so as the user types, the browser can show those suggestions. For example, you attach a datalist to an input like this: . This lets users either pick a value from the list or type a different value if they wish.

This differs from a dropdown created with a select element, which forces the user to pick from the provided options. The option element is used inside a select (and also inside a datalist to define the possible values), but the mechanism that provides inline input suggestions is datalist, not a plain select. The plain list element isn’t used for this purpose.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy