- From: Liam Quinn <liam@htmlhelp.com>
- Date: Mon, 10 Jun 2002 17:49:24 -0400 (EDT)
- To: John M Collins <jmc@xisl.com>
- cc: <html-tidy@w3.org>
On Sun, 9 Jun 2002, John M Collins wrote: > I think it gives spurious warnings about "Missing <li>" and inserts > spurious ones if you use "</li>" with nested lists. > > Consider (this is mangled from an auto-generated index): > > <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"> > <html> > <head> > <title>Contents</title> > <link href="TxtMan.css" rel="stylesheet" type="text/css"> > </head> > <body class="ind"> > <ol> > <li>First</li> > <ol> > <li>Part A</li> > <li>Part B</li> > </ol> > <li>Second</li> > <ol> > <li>Part A</li> > <li>Part B</li> > </ol> > </ol> > </body> > </html> > > Htmltidy bleats about "missing <li>" at the two marked "<ol>"s and > inserts unwanted "<li>"s in front. All is OK if you skip the "</li>"s. An OL element can only contain LI elements directly, not other OL elements. You need to structure your list like this: <ol> <li>First <ol> <li>Part A</li> <li>Part B</li> </ol> </li> <li>Second <ol> <li>Part A</li> <li>Part B</li> </ol> </li> </ol> -- Liam Quinn
Received on Monday, 10 June 2002 17:49:17 UTC