You are here: Re: The </li> before a nested list. Why not? « HTML « IT news, forums, messages
Re: The </li> before a nested list. Why not?

Posted by Bergamot on 03/31/07 13:12

patrick j wrote:
>
> <li><a href="#">link</a></li>
> <ul>

The above is invalid syntax, as any HTML validator will tell you.

> But it doesn't seem to make sense to leave out that </li> before the nested
> list.

Yes, it does. As Els said, the nested list is part of the parent <li>,
not separate from it. That's what makes it nested, not merely the
placement of the child <ul>.

> I'd be grateful if someone could explain why it is so?

The reason you see so much of the invalid syntax version is because many
"WYSIWYG" tools don't generate correct syntax for nested lists. The only
reason it doesn't look broken on screen is because of browser error
correction.

--
Berg

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация