This tip, adding the <td> tag (s), solves a practical problem, but as for the question “why”, the answer is that when browsers analyze the table and find any content outside the correct syntax, they simply compile it and put it before by the table.
So whyyyyyyyyyy does this appear on top ?! it’s not really considered as a row placed in front of another row, but as garbage outside the rows and dumped in front of the table. You can see this, for example. Using a style sheet rule, for example table { border: solid red } ; the text then appears outside the border.
This browser behavior is described in the HTML5 project as “parenting,” in the section on Unexpected Layout in Tables . (The title is somewhat misleading, as browsers are really prepared for a specific handling of the situation, so it really handles incorrect markup in tables.)
source share