On Thu, 21 Oct 2004 19:55:38 +1300, David McDonald
<[EMAIL PROTECTED]> wrote:
>
> I've noticed in the code on Russ 'listopathic' page, that <h2> and
> other tags are inside <li> tags eg:
>
> <li id="header">
> <h1>What is the obsession with lists?</h1>
> </li>
>
> I've seen this other places as well, but have always assumed that
> block level elements inside <li> tags was invalid? Was I wrong here?
>
> Anyone have the W3C reference for this sort of thing handy?
>From HTML4.01 DTD:
<!ELEMENT LI - O (%flow;)* -- list item -->
So we can have %flow in our LI's.
What's a %flow? Going deeper:
<!ENTITY % flow "%block; | %inline;">
%block and %inline means we can have almost anything inside the LI,
but to be specific:
<!ENTITY % block
"P | %heading; | %list; | %preformatted; | DL | DIV | NOSCRIPT |
BLOCKQUOTE | FORM | HR | TABLE | FIELDSET | ADDRESS">
<!ENTITY % heading "H1|H2|H3|H4|H5|H6">
<!ENTITY % list "UL | OL">
<!ENTITY % preformatted "PRE">
and:
<!ENTITY % inline "#PCDATA | %fontstyle; | %phrase; | %special; | %formctrl;">
<!ENTITY % fontstyle
"TT | I | B | BIG | SMALL">
<!ENTITY % phrase "EM | STRONG | DFN | CODE |
SAMP | KBD | VAR | CITE | ABBR | ACRONYM" >
<!ENTITY % special
"A | IMG | OBJECT | BR | SCRIPT | MAP | Q | SUB | SUP | SPAN | BDO">
<!ENTITY % formctrl "INPUT | SELECT | TEXTAREA | LABEL | BUTTON">
So the list is:
H1,H2,H3,H4,H5,H6,UL, OL,PRE,TT, I, B, BIG, SMALL,EM, STRONG, DFN, CODE,
SAMP, KBD, VAR, CITE, ABBR, ACRONYM, A, IMG, OBJECT, BR,SCRIPT, MAP,
Q, SUB, SUP, SPAN, BDO,INPUT, SELECT, TEXTAREA, LABEL, BUTTON and
#PCDATA
Hope I did not miss anything.
Regards,
Rimantas
--
http://rimantas.com/
******************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************