Hi all,
 
maybe I should know this, but I cannot even find where does w3c refers to this, so here it goes:
I have a very simple document with a strict dtd.
on the body I have something like this:
  <h1>...</h1>
  <p>...</p>
  <em class="nota">...</em>
while validating the document I get this message:
___________________
(quoting the validator)
Line 15 column 18: document type does not allow element "em" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag .
<em class="nota">...,
The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
___________________

the question is:
I cannot find a place where w3c tells me I cannot place an inline element directly on the body.
In fact, all I find besides references about what is it, what can it contain and wich attributes it can handle, is a bad example of the "well formedness" concept:
___________________
(quoting w3c)
CORRECT: nested elements.
<p>here is an emphasized <em>paragraph</em>.</p>
INCORRECT: overlapping elements
<p>here is an emphasized <em>paragraph.</p></em>
____________________

so, is it really mandatory that em elements (or any inline element for that matter) should go inside block level elements, or am I missing something here?

Best regards,

Isabel Santos

Reply via email to