Is there a reason why the Stack snippet console displays <input>
elements within an array with an end tag? I noticed this behavior when posting this answer.
Both Chrome and Firefox consoles on PC display this answer correctly (i.e. sans </input>
end tag). Also, just in case I am mistaken about how an <input>
tag should be, I found this:
Tag omission Must have a start tag and must not have an end tag.
I have scoured SO extensively because I expected this issue to have been reported already, but couldn't find anything remotely similar.
Here's a Stack Snippet showing this in action:
window.onload = function() {
console.log(Array.from(document.querySelectorAll('input')));
};
<input name="example" type="radio" value="1">
<input name="example" type="radio" value="2">
</input>
.</input>
is evident.