This commit is contained in:
Ilya Kantor 2017-03-13 00:21:00 +03:00
parent 8360ebbe90
commit dbf5c7587c
31 changed files with 635 additions and 455 deletions

View file

@ -1,5 +1,9 @@
The HTML in the task is incorrect. That's the matter. There may be no text inside the `<table>`, only table-specific tags.
The HTML in the task is incorrect. That's the reason of the odd thing.
The question can be easily solved by exploring the DOM in the browser tools. Then we'll see that the browser placed the text `"aaa"` *before* the table.
The browser has to fix it automatically. But there may be no text inside the `<table>`: according to the spec only table-specific tags are allowed. So the browser adds `"aaa"` *before* the `<table>`.
The HTML standard thoroughly specifies how to process bad HTML, and the behavior of the browser here is correct.
Now it's obvious that when we remove the table, it remains.
The question can be easily answered by exploring DOM using the browser tools. They show `"aaa"` before the `<table>`.
The HTML standard specifies in detail how to process bad HTML, and such behavior of the browser is correct.