When 2 tags are self-closed, should they be in the same position in hierarchy, or should the next tag be the child of the first one?
I used to believe that both structures were syntactically identical:
Example 1
<div>
<div class="bordered"></div>
<div class="bordered"></div>
</div>
Example 2
<div>
<div class="bordered"/>
<div class="bordered"/>
</div>
However, jsFiddle tells me that the second one is equivalent to:
Example 3
<div>
<div class="bordered">
<div class="bordered"></div>
</div>
</div>
I noticed this behavior when I updated jQuery in my npm dependencies. Previous versions up to 3.4.1 converted Example 2 to Example 1, but the latest version (3.5.0) converts Example 2 to Example 3.
Which behavior do you think is correct?