"Bernd Schlingenkamp" <be*****************@hotmail.com> wrote:
Is this valid html:
<ul>
<li><div>somecontent</div></li>
<li><div>somecontent</div></li>
<li><div>somecontent</div></li>
</ul>
As others have said, it is valid. But I wonder why you ask. Why would you
like to use the <div> markup? It has no visual effect by default - inside
<li> elements, since each list item starts on a new line anyway - and it
has no semantic meaning. But it could be used for various tricks - e.g.,
if you wish to make list bullets red without affecting text color, you
could make the <ul> element's text color red but the color of <div>
elements inside <li> elements black (or whatever). And there's nothing
syntactically wrong with such tricks.
--
Yucca,
http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring:
http://www.cs.tut.fi/~jkorpela/www.html