[UPHPU] proper HTML lists

Shane Anderson shane at cpd2.usu.edu
Thu Feb 24 10:33:02 MST 2005


Hi

Option 1 is the correct markup for nested lists.

It does matter if you want well formed markup and the insurance that your 
page will work on newer browsers in the future, now that standards 
compliance has become the goal of many browser companies. Option 2 might 
work now on some browsers but it is not HTML 4 or XHTML compliant. Do it 
right and it will always work.

Authoritative documentation:
http://www.w3.org/TR/html4/struct/lists.html

Guides:
http://www.w3.org/MarkUp/Guide/
http://www.w3schools.com/html/html_lists.asp


Shane Anderson
WebAIM.org


At 09:51 AM 2/24/2005, Wade Preston Shearer wrote:
>Which of these is proper? or does it matter?
>
>Option 1:
>
><ul>
>         <li>
>                 <ul>
>                         <li></li>
>                         <li></li>
>                         <li></li>
>                         <li></li>
>                 </ul>
>         </li>
>         <li>
>                 <ul>
>                         <li></li>
>                         <li></li>
>                         <li></li>
>                         <li></li>
>                 </ul>
>         </li>
></ul>
>
>
>Option 2:
>
><ul>
>         <li></li>
>                 <ul>
>                         <li></li>
>                         <li></li>
>                         <li></li>
>                         <li></li>
>                 </ul>
>         <li></li>
>                 <ul>
>                         <li></li>
>                         <li></li>
>                         <li></li>
>                         <li></li>
>                 </ul>
></ul>
>
>
>
>_______________________________________________
>
>UPHPU mailing list
>UPHPU at uphpu.org
>http://uphpu.org/mailman/listinfo/uphpu
>IRC: #uphpu on irc.freenode.net




More information about the UPHPU mailing list