Posted by X Ryl on 08/24/07 14:55
Hi,
I've tried validate something like (declaration excluded) :
<h1>foo <div>bar</div></h1>
It doesn't validate, as <h1>'s DTD is : <!ELEMENT (%heading;) - -
(%inline;)* -- heading -->
meaning that h1 can only contains inline element.
That's strange as DIV DTD is : <!ELEMENT DIV - - (%flow;)*
-- generic language/style container -->
with flow being "block or inline"
That's also strange as the same code with p in-place of h1 validate:
<p>foo <div>bar</div></p>
and P DTD ( <!ELEMENT P - O (%inline;)* -- paragraph --> )
is declared like H1
Also, both P and H1 are declared in block level elements.
What is the reason behind this ?
Does DIV transmutate to inline only in P or is there a rule for this ?
Best regards
Navigation:
[Reply to this message]
|