Error while validating HTML "document type does not allow element "li" here; missing one of "ul", "o

Posted by brumila on Stack Overflow See other posts from Stack Overflow or by brumila
Published on 2010-03-23T14:30:43Z Indexed on 2010/03/23 14:33 UTC
Read the original article Hit count: 593

Filed under:
|
|
|

Hey! So I'm trying to code something on wordpress for the first time but the validator doesn't seem to like me. Look at the error I got while validating:

Line 87, Column 33: document type does not allow element "li" here; missing one of "ul", "ol", "menu", "dir" start-tag

I've searched everywhere, I'm not aware of any missing or misplaced li or ul tags

can someone help me out on this one?

    <!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 profile="http://gmpg.org/xfn/11">
<title>
Blog</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="generator" content="WordPress 2.9.2" />
<!-- leave this for stats please -->
<link rel="stylesheet" href="http://localhost/wordpress/wp-content/themes/cmc-milagro/style.css" type="text/css" media="screen" />
<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="http://localhost/wordpress/?feed=rss2" />
<link rel="alternate" type="text/xml" title="RSS .92" href="http://localhost/wordpress/?feed=rss" />
<link rel="alternate" type="application/atom+xml" title="Atom 0.3" href="http://localhost/wordpress/?feed=atom" />
<link rel="pingback" href="http://localhost/wordpress/xmlrpc.php" />
 <link rel='archives' title='March 2010' href='http://localhost/wordpress/?m=201003' />
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://localhost/wordpress/xmlrpc.php?rsd" />
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://localhost/wordpress/wp-includes/wlwmanifest.xml" /> 

<link rel='index' title='Blog' href='http://localhost/wordpress' />
<meta name="generator" content="WordPress 2.9.2" />
</head>
<body>
<div>
  <h1><a href="http://localhost/wordpress">
    Blog</a>
  </h1>
  Just another WordPress weblog</div>
<div id="container">
      <h2><a href="http://localhost/wordpress/?p=8">

    Teste Post 3    </a></h2>
  <div class="post" id="post-8">
    <div class="entry">
      <p>Aliquam erat volutpat. Fusce in nibh elit. Morbi lorem urna, viverra sed  blandit eget, mattis venenatis felis. Maecenas viverra pellentesque  justo, vel tincidunt massa semper sit amet. Vestibulum rhoncus purus in  mauris fermentum ut aliquet augue semper.</p>
      <p class="postmetadata">
        Filed under&#58;        <a href="http://localhost/wordpress/?cat=1" title="View all posts in Uncategorized" rel="category">Uncategorized</a>        by        admin        <br />

        <a href="http://localhost/wordpress/?p=8#respond" title="Comment on Teste Post 3">No Comments &#187;</a>         &#124; <a class="post-edit-link" href="http://localhost/wordpress/wp-admin/post.php?action=edit&amp;post=8" title="Edit post">Edit</a>      </p>
    </div>
  </div>
    <h2><a href="http://localhost/wordpress/?p=5">
    Teste Post 2    </a></h2>
  <div class="post" id="post-5">

    <div class="entry">
      <p>Aliquam erat volutpat. Fusce in nibh elit. Morbi lorem urna, viverra sed  blandit eget, mattis venenatis felis. Maecenas viverra pellentesque  justo, vel tincidunt massa semper sit amet. Vestibulum rhoncus purus in  mauris fermentum ut aliquet augue semper. Duis orci metus, cursus ac  tempor eget, faucibus vel elit. Sed rutrum mollis posuere. Maecenas  luctus commodo augue vel fringilla. Nunc enim lacus, varius nec tempor  sed, congue vel elit. Suspendisse urna ligula, pharetra ac malesuada  quis, scelerisque eget justo.</p>
      <p class="postmetadata">
        Filed under&#58;        <a href="http://localhost/wordpress/?cat=1" title="View all posts in Uncategorized" rel="category">Uncategorized</a>        by        admin        <br />
        <a href="http://localhost/wordpress/?p=5#respond" title="Comment on Teste Post 2">No Comments &#187;</a>         &#124; <a class="post-edit-link" href="http://localhost/wordpress/wp-admin/post.php?action=edit&amp;post=5" title="Edit post">Edit</a>      </p>

    </div>
  </div>
    <h2><a href="http://localhost/wordpress/?p=3">
    Teste Post 1    </a></h2>
  <div class="post" id="post-3">
    <div class="entry">
      <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam ut mattis  elit. In sed nulla lobortis dolor pellentesque fringilla at eget ipsum.  Proin pellentesque vehicula ultricies. Phasellus velit nunc, tempus nec  scelerisque vel, euismod pellentesque diam. Vivamus consectetur, sapien  sit amet rhoncus porta, sapien nisl imperdiet diam, dapibus placerat  sem ante condimentum nisl. Nulla facilisi. Mauris eu turpis mauris. Nunc  at turpis elit, et mattis purus. Proin varius, nunc rhoncus consectetur  dignissim, lacus augue accumsan sem, nec pretium magna est a massa.  Duis eu justo arcu. Curabitur diam ligula, semper non blandit ut,  sodales ac dui.</p>
      <p class="postmetadata">

        Filed under&#58;        <a href="http://localhost/wordpress/?cat=1" title="View all posts in Uncategorized" rel="category">Uncategorized</a>        by        admin        <br />
        <a href="http://localhost/wordpress/?p=3#respond" title="Comment on Teste Post 1">No Comments &#187;</a>         &#124; <a class="post-edit-link" href="http://localhost/wordpress/wp-admin/post.php?action=edit&amp;post=3" title="Edit post">Edit</a>      </p>
    </div>
  </div>

    <h2><a href="http://localhost/wordpress/?p=1">
    Hello world!    </a></h2>
  <div class="post" id="post-1">
    <div class="entry">
      <p>Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!</p>
      <p class="postmetadata">
        Filed under&#58;        <a href="http://localhost/wordpress/?cat=1" title="View all posts in Uncategorized" rel="category">Uncategorized</a>        by        admin        <br />

        <a href="http://localhost/wordpress/?p=1#comments" title="Comment on Hello world!">1 Comment &#187;</a>         &#124; <a class="post-edit-link" href="http://localhost/wordpress/wp-admin/post.php?action=edit&amp;post=1" title="Edit post">Edit</a>      </p>
    </div>
  </div>
    <div class="navigation">
      </div>
  </div>

<div class="sidebar">
  <ul>
      <li id="search">
      <form method="get" id="searchform" action="http://localhost/wordpress/">
<div>
 <input type="text" value="" name="s" id="s" size="15" /><br />
 <input type="submit" id="searchsubmit" value="Search" />
</div>
</form>      <li class="pagenav"><h2>Pages</h2><ul><li class="page_item page-item-2"><a href="http://localhost/wordpress/?page_id=2" title="About">About</a></li>

</ul></li>    </li>
    <li>
      <h2>
        Categories      </h2>
      <ul>
         <li class="cat-item cat-item-1"><a href="http://localhost/wordpress/?cat=1" title="View all posts filed under Uncategorized">Uncategorized</a> (4)
</li>
      </ul>

    </li>
    <li>
      <h2>
        Archives      </h2>
      <ul>
         <li><a href='http://localhost/wordpress/?m=201003' title='March 2010'>March 2010</a></li>
      </ul>
    </li>

      <li id="linkcat-2" class="linkcat"><h2>Blogroll</h2>
 <ul>
<li><a href="http://wordpress.org/development/">Development Blog</a></li>
<li><a href="http://codex.wordpress.org/">Documentation</a></li>
<li><a href="http://wordpress.org/extend/plugins/">Plugins</a></li>
<li><a href="http://wordpress.org/extend/ideas/">Suggest Ideas</a></li>
<li><a href="http://wordpress.org/support/">Support Forum</a></li>
<li><a href="http://wordpress.org/extend/themes/">Themes</a></li>

<li><a href="http://planet.wordpress.org/">WordPress Planet</a></li>

 </ul>
</li>
    <li>
      <h2>
        Meta      </h2>
      <ul>
        <li><a href="http://localhost/wordpress/wp-admin/">Site Admin</a></li>        <li>

          <a href="http://localhost/wordpress/wp-login.php?action=logout&amp;_wpnonce=ee45c3c988">Log out</a>        </li>
              </ul>
    </li>
      </ul>
</div>

<div id="footer">
<p>
Copyright &#169; 2010 Blog</p>

</div>

</body>
</html>

© Stack Overflow or respective owner

Related posts about Wordpress

Related posts about validating