![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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? |
#3
| |||
| |||
|
|
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? |
#4
| |||
| |||
|
|
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): |
|
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? |
#5
| |||
| |||
|
|
What gives? Am I misunderstanding the spec, or a people doing it wrong? |
![]() |
| Thread Tools | |
| Display Modes | |
| |