PDA

View Full Version : Ordered and unordered lists


jack343289
08-03-2011, 05:12 AM
I am having difficulty validating bullited lists, so I downloaded an example from http://www.w3.org

Here it is:
<UL>
<LI> ... Level one, number one...
<OL>
<LI> ... Level two, number one...
<LI> ... Level two, number two...
<OL start="10">
<LI> ... Level three, number one...
</OL>
<LI> ... Level two, number three...
</OL>
<LI> ... Level one, number two...
</UL>

When checked by the advisor it gets the "thumbs down" for several of the elements.

Which brings me to two questions:
1. Has this software programme become corruped somehow?
2. Is there an error in this programme?

Regards
Jack

Jason Byrnes
08-03-2011, 08:16 AM
please post the errors that the advisor is giving you and a copy of the page in a zip archive so can examine what the problem is to determine the cause.

jack343289
08-03-2011, 10:23 AM
Enclosed are the files you requested
Regards
Jack

Jason Byrnes
08-03-2011, 10:46 AM
the doctype being used on your page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

is the XHTML 1.0 Transitional doctype.


in the XHTML 1.0 Transitional doctype, all html tags must be in lower case.

instead of:
<UL>
<LI> ... Level one, number one...</LI>
</UL>


it should be:
<ul>
<li> ... Level one, number one...</li>
</ul>

jack343289
08-03-2011, 11:01 PM
Jason, thank you for your help in this matter.

I have changed all the tags to lower case but I still get the error results (see attached)

Any ideas?

Thank you
Jack

Jason Byrnes
08-04-2011, 06:43 AM
you are not writing semantically correct html.


you need to close the <li> tags before starting another, instead of:
<li> ... Level one, number one...

you should have:
<li> ... Level one, number one...</li>

jack343289
08-04-2011, 06:58 AM
Oops I zipped up the wrong file - here is the correct one

Jason Byrnes
08-04-2011, 07:09 AM
the xhtml doctype does not allow for an ordered list (<ol>) to be nested in an unordered list (<ul>)