I just started working with datalist in conjunction with inputs. When creating an option in a datalist, (I’m using Visual Studio Code) the IDE displays an opening and closing option tag. However, according to W3schools, there is no closing option tag in a datalist. This seems inconsistent, or maybe it doesn’t matter either way.
This is defined in the HTML Standard:
optionelement’s end tag can be omitted if the
optionelement is immediately followed by another
optionelement, or if it is immediately followed by an
optgroupelement, or if there is no more content in the parent element.