W3C home > Mailing lists > Public > www-validator@w3.org > March 2011

Re: It isn't a standard if it has hidden rules for historical reasons.

From: Philip Taylor (Webmaster, Ret'd) <P.Taylor@Rhul.Ac.Uk>
Date: Thu, 10 Mar 2011 08:54:38 +0000
Message-ID: <4D7891CE.2050902@Rhul.Ac.Uk>
To: Aaron Oxford <Aaron.Oxford@objecttrading.com>
CC: "Jukka K. Korpela" <jkorpela@cs.tut.fi>, W3C Validator Community <www-validator@w3.org>
As Jukka kindly points out :

> You can't have a UL as a direct (or indirect) descendant
> of a P, simply because the HTML syntax says so. Block-level elements
> often nest; for example, DIV elements may be nested as much as you like.

and DIV elements can also directly contain ULs, so perhaps the more
natural expression for what you want to accomplish is :

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<HTML>
<HEAD>
	<TITLE>Hallo</TITLE>
	<STYLE TYPE="TEXT/CSS">
		UL {margin-top: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0}
	</STYLE>
</HEAD>
<BODY>
	<DIV class="Paragraph">text text
		<UL>
			<LI>more text</LI>
		</UL>
	text text</DIV>
</BODY>
</HTML>

Philip Taylor
Received on Thursday, 10 March 2011 08:55:15 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:14:46 GMT