|
Posted by Andy Dingley on 07/27/06 00:20
On Thu, 27 Jul 2006 01:39:22 +0200, Mike Massonnet <_@_.ch> wrote:
> I'm wondering how to write lists, and especially the case where there
>are sub-lists.
Go read the W3C recommendations for HTML, in particular the DTD for HTML
4.01 Strict. _This_ is what says is correct, not a tutorial somewhere
or a common preference. DTDs aren't the easiest things to learn to
read, but they're worth making the effort if you're starting to care
about such things.
> Which one of both is correct?
><ul>
> <li>My item
> <ul>
> <li>Sub item...</li>
> </ul>
> </li>
> <li>EOL</li>
></ul>
The _ONLY_ thing you can validly out in a <ul> is a <li>
So if you want <ul> "inside" another <ul> (or a <p> inside a <ul>, or
whatver you're after), then you have to do it by having an intermediate
<li> between them, as your example shows.
[Back to original message]
|