Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Old 02-11-2006, 05:24 PM nested lists
Junior Talker

Posts: 1
Trades: 0
my code i know is ok is a good example of nested list i know this cause i copy this code from another site , but why when i try to validate this code i get this error messages : i will post the errors at the end of the thread.....

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>zass</title>
</head>
<body>

<ul>
<li>big list item one</li>
<li>big list item two</li>
<li>big list item three</li>
<ul>
<li>sublist item one</li>
<li>sublist item two</li>
</ul>
<li>big list item four</li>
</ul>

</body>
</html>
  1. <LI class=msg_err>Error Line 15 column 3: document type does not allow element "ul" here; assuming missing "li" start-tag.<ul>
    <LI class=msg_err>Error Line 19 column 3: document type does not allow element "li" here; missing one of "ul", "ol", "menu", "dir" start-tag.<li>big list item four</li>The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
    One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").


    <LI class=msg_err>Error Line 20 column 4: end tag for "li" omitted, but OMITTAG NO was specified.</ul> You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">".

  2. Info Line 15 column 0: start tag was here.<ul>
Error Line 20 column 4: end tag for "li" omitted, but OMITTAG NO was specified.
</ul>

Line 15 column 0: start tag was here.
<ul>
gunderson is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-12-2006, 02:07 PM Re: nested lists
Guerrilla's Avatar
Ultra Talker

Posts: 424
Trades: -1
when nesting you put the <UL> inside the <LI> tag like this

<ul>
<li>big list item one</li>
<li>big list item two</li>
<li>big list item three
<ul>
<li>sublist item one</li>
<li>sublist item two</li>
</ul></li> <!-- close it here -->
<li>big list item four</li>
</ul>

Havent tested it but it should validate ok.
Guerrilla is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to nested lists
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.10512 seconds with 12 queries