| |
comp.infosystems.www.authoring.stylesheets |
Not the easiest thing to learn to read though! (search for "DTD <!-- %inline; character level elements and text strings <!-- %inline; covers inline or "text-level" elements --> <!ENTITY % inline "#PCDATA | %fontstyle; | %phrase; | %special; | So we see from this that <span> is one member of %inline; and also of <!ENTITY % block <!ENTITY % flow "%block; | %inline;"> We see here that <div> is one member of %block; and thus of %flow; but <!ELEMENT SPAN - - (%inline;)* > <!ELEMENT DIV - - (%flow;)* > <span> can contain anything from %inline; So <div> can contain <span>, but <span> can't contain <div> Now see if you can read the DTD yourself and see where <p> fits into
> Where can I find some information on nesting rules?
introduction" or something)
HTML has two basic content models:
%block; block-like elements e.g. paragraphs and lists
-->
Actually there's a third one too %flow;, which comprises both %inline;
and %block; elements
<!ENTITY % special
"A | IMG | OBJECT | BR | SCRIPT | MAP | Q | SUB | SUP | SPAN | BDO">
%formctrl;">
%flow; (see below)
"P | %heading; | %list; | %preformatted; | DL | DIV | NOSCRIPT |
BLOCKQUOTE | FORM | HR | TABLE | FIELDSET | ADDRESS">
NOT %inline;
<div> can contain anything from %block; or %inline;
all this.