Dear Isabel,

As you can see from here http://www.w3.org/TR/xhtml1/diffs.html your
markup is incorrect because you are attempted to use an old (html4)
style (<em>) within a new XML based document. In XML based documents
you have to use strict markup, e.g.

heading: <h1></h1>
paragraph: <p></p>

etc.

Emphasizing some excerpt of your text should go that way as the W3C
validator says:

emphasized text in a paragraph:

<p>Hello <em>World</em>!</p>

or an emphasized paragraph:

<p><em>Hello World!</em></p>

And yes it is mandatory because e.g. XML interpreters won't "understand" this:

<p>here is an emphasized <em>paragraph.</p></em>

And an XHTML document has to be conformant with the XML markup.

Regards,

Janos

PS. Sorry for my poor english :)

2005/10/23, Isabel Santos <[EMAIL PROTECTED]>:
> 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
******************************************************
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list & getting help
******************************************************

Reply via email to