W3C home > Mailing lists > Public > www-validator@w3.org > July 2001

Re: problems with validator program?

From: Masayasu Ishikawa <mimasa@w3.org>
Date: Fri, 13 Jul 2001 15:52:49 +0900
To: lila@okkod.pair.com
Cc: www-validator@w3.org
Message-Id: <20010713155249U.mimasa@w3.mag.keio.ac.jp>
Nancy Carlin <lila@okkod.pair.com> wrote:

> One thing I'm trying to do is nest <UL> directives.  My O'Reilly
> "Web Design in a Nutshell" book says nesting is OK (page 122).
> 	<UL>
> 		<LI>stuff</LI>
> 		<UL>
> 			<LI>even more stuff</LI>
> 		</UL>
> 	</UL>

That book is wrong.  In HTML 4, the content model of the UL element
is defined as follows, in all DTDs (Strict/Transitional/Frameset).

    <!ELEMENT UL - - (LI)+                 -- unordered list -->

So you have to write something like this:

			<LI>even more stuff</LI>

> The other problem I'm having is that I'm getting the <OL> not allowed
> here in http://www.nancycarlinassociates.com/tea.shtml
> 	Error: element "OL" not allowed here; possible cause is an inline
> 	element containing a block-level element
> The HTML is: (I'm trying to boldface an entire list).
> 	<H2>stuff</H2>
> 	<B>
> 	<OL>
> 	...

The reason is exactly what the validator said.  OL is a block-level
element, and not allowed in B, which is an inline-level element.

> I really hope that the standard does not require me to:
> 	<H2>stuff</H2>
> 	<OL>
> 	<LI><B>aaa</B></LI>
> 	<LI><B>bbb</B></LI>

Use style sheets to control presentation, e.g. the following rule

   OL { font-weight: bolder }

will make an entire list boldface.

Masayasu Ishikawa / mimasa@w3.org
W3C - World Wide Web Consortium
Received on Friday, 13 July 2001 02:52:48 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 November 2015 11:01:14 UTC