W3C home > Mailing lists > Public > www-html@w3.org > March 1998

Re: Nested Lists

From: Aymeric Poulain Maubant <Aymeric.PoulainMaubant@enst-bretagne.fr>
Date: Wed, 11 Mar 1998 18:48:59 +0100
Message-Id: <199803111749.SAA29608@melimelo.enst-bretagne.fr>
To: www-html@w3.org
>    <ul>
>       <li>Heading</li>
>       <ul>
>          <li>Subitem</li>
>          <li>Subitem</li>
>       </ul>
>    </ul>
> The Validation Report said:
>    Error at line 75:
>       <ul>
>          document type does not allow element "UL" here;
>          assuming missing "LI" start-tag

From RFC1866 (html2.0, which is enough) you have :

<!ELEMENT (OL|UL) - -  (LI)+>

which means the only tag you can find inside a <ul></ul> or <ol></ol>
structure is <li> (and you can find many of them, but at least one).

Then, you read :

<!ELEMENT LI    - O %flow>

which means that </li> is optionnal, and <li></li> contains strings
of type "flow" (which is <!ENTITY % flow "(%text|%block)*"> and if you
follow the definition chain, you will find that <ul> is allowed
within <li>)

The correct minimal code is thus :

Received on Wednesday, 11 March 1998 12:49:09 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 30 April 2020 16:20:33 UTC