question about the BODY tag in the HTML DTD
In the DTD of HTML 4.01, <http://www.w3.org/TR/html401/sgml/dtd.html>,
it states that the only legal elements in the BODY element are block
tags (and a few more: SCRIPT, INS and DEL):
<!ELEMENT BODY O O (%block;|SCRIPT)+ +(INS|DEL) -- document body -->
These block elements are the following:
<!ENTITY % block
"P | %heading; | %list; | %preformatted; | DL | DIV | NOSCRIPT |
BLOCKQUOTE | FORM | HR | TABLE | FIELDSET | ADDRESS">
Where %heading; is the tags H1 to H6, %list; is UL and OL, and
%preformatted; is PRE.
That is all.
So, if I get this correctly, it is not legal to put text, or inline
elements (text formatting, SPAN) directly into a BODY tag. None of these
tags are implied. Yet, people do it all the time.
What gives? Am I misunderstanding the spec, or a people doing it wrong?
--
Bart.
|