The start tag for <tbody>
is optional. That is, you can leave it out, but it is automatically inserted by the browser whenever needed.
And it is needed, because the rules say you can't have a tr
directly in a table
. The only children of a table
element can be caption
, colgroup
, thead
, tbody
and tfoot
.
So, if the browser encounters a tr
outside a tbody
, it inserts a tbody
which the tr
will reside in.
For a more formal way of saying this, see http://www.w3.org/TR/html-markup/tbody.html
By the way, the very same happens with other start tags, like <body>
. If you omit that, writin, say, a <h1>
directly after the </head>
, the browser will insert an implied <body>
automatically.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…