|
Posted by Andy Dingley on 08/24/07 15:35
On 24 Aug, 15:55, X Ryl <boite.pour.s...@gmail.com> wrote:
> 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 means that <div> can _contain_ "block or inline"
<div> itself is a member of %block;, but _not_ a member of %inline;
and so it can't be placed inside <h1>
You need to read the definition of %block; to see this, not the
definition of <div>
Navigation:
[Reply to this message]
|