Essentials
primer-original-v2mediumEssentialsWeb Technologiesprimer-original-v2

Consider the below webpage:

Answer options

A
<input type="date" id="date" name="date" list="holidays"> <datalist id="holidays"> <option label="Republic Day">2017-01-26</option> <option label="May Day">2017-05-01</option> <option label="Independence Day">2017-08-15</option> </datalist> // datalist is used instead of select because we can add our own options also but using select tag we can choose only between options
B
Incorrect HTML/JavaScript syntax
C
Valid syntax but does not satisfy the requirement
D
Unrelated markup or method

Correct answer: <input type="date" id="date" name="date" list="holidays"> <datalist id="holidays"> <option label="Republic Day">2017-01-26</option> <option label="May Day">2017-05-01</option> <option label="Independence Day">2017-08-15</option> </datalist> // datalist is used instead of select because we can add our own options also but using select tag we can choose only between options

Detailed Solution & Conceptual Analysis

This question has been retained as-is due to its unique context.

Key Engineering Takeaway

In Essentials, understanding the underlying mechanics of Essentials is critical for writing performant, bug-free production code and passing rigorous technical architecture reviews.

Related Essentials questions

Practice more Essentials questions

PrimerPrep has independently reviewed practice questions and coding exercises — all free.