The multiple attribute (specification) is used to notate that multiple values should be able to be selected.
The specification for the multiple element shows an example of usage with datalists. However browsers have implemented the multiple attribute only for input elements where type=email
, the type of input element shown in the specifications example. It would seem like the multiple attribute should also be followed for when type is not email, especially when type=text
, however the specification does not make this clear, creating a large discrepancy between what people would expect, and what actually happens. This discrepancy also has potential to lead to bad practices where type=email
is used for non-email inputs.
#web #html #datalist