lists being used as links. will not validate.

  • jesman1
  • Born
  • Born
  • jesman1
  • Posts: 1

Post 3+ Months Ago

well, i'm doing a project for school, and my html code will not validate. any suggestions?

Code: [ Select ]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html xmlns="can't put link here."><!-- TELLS BROWSER TO READ PAGE AS HTML FILE -->
<head>
    <title>Minecraft</title>
    <meta http-equiv="content-type" content="text/html;charset=utf-8" />
    <link rel="stylesheet" type="text/css" href="style.css" />
</head>

<body>
<ul>
    <div id="linkhome">
        <li><a href="index.html">Home</a></li>
    </div>
    
    <div id="linkabout">
        <li> <a href="about.html">About</a></li>
    </div>

    <div id="linkhowto">
        <li> <a href="howto.html">How To</a></li>
    </div>    
    
    <div id="linklinks">
        <li> <a href="links.html">Links</a></li>
    </div>    
    
    <div id="linkscreens">
        <li> <a href="screens.html">Screenshots</a></li>
    </div>
    </ul>
    <div id="headbar"></div>

    <div id="wrapper">
        <div id="logo">
            <img src="logo.gif"/>
        </div>
        
        
    </div>
    <h1>Website Created By Jesse Halls. prepare for awesomeness.<br/><br/>
    It's super amazing. agreed?</h1>
    <p>
    <form>

    <input type="radio" name="coolness" value="yes"/>yeah!<br/>
    <input type="radio" name="coolness" value="no"/>noway!

    </form>
    </p>
    
</body>

</html>
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
  2. <html xmlns="can't put link here."><!-- TELLS BROWSER TO READ PAGE AS HTML FILE -->
  3. <head>
  4.     <title>Minecraft</title>
  5.     <meta http-equiv="content-type" content="text/html;charset=utf-8" />
  6.     <link rel="stylesheet" type="text/css" href="style.css" />
  7. </head>
  8. <body>
  9. <ul>
  10.     <div id="linkhome">
  11.         <li><a href="index.html">Home</a></li>
  12.     </div>
  13.     
  14.     <div id="linkabout">
  15.         <li> <a href="about.html">About</a></li>
  16.     </div>
  17.     <div id="linkhowto">
  18.         <li> <a href="howto.html">How To</a></li>
  19.     </div>    
  20.     
  21.     <div id="linklinks">
  22.         <li> <a href="links.html">Links</a></li>
  23.     </div>    
  24.     
  25.     <div id="linkscreens">
  26.         <li> <a href="screens.html">Screenshots</a></li>
  27.     </div>
  28.     </ul>
  29.     <div id="headbar"></div>
  30.     <div id="wrapper">
  31.         <div id="logo">
  32.             <img src="logo.gif"/>
  33.         </div>
  34.         
  35.         
  36.     </div>
  37.     <h1>Website Created By Jesse Halls. prepare for awesomeness.<br/><br/>
  38.     It's super amazing. agreed?</h1>
  39.     <p>
  40.     <form>
  41.     <input type="radio" name="coolness" value="yes"/>yeah!<br/>
  42.     <input type="radio" name="coolness" value="no"/>noway!
  43.     </form>
  44.     </p>
  45.     
  46. </body>
  47. </html>


I'm trying to deal with the "document type does not allow element "li" here; missing one of "ul", "ol" start-tag" error mostly. any suggestions greatly appreciated.
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8416
  • Loc: USA

Post 3+ Months Ago

Convert those <div id="link..."> to <ul id="link...">

Then declare list-style-type: none; in the CSS for those link...

Better yet, to do it something like this...
HTML Code: [ Select ]
<ul id="menu">
    <li id="linkhome"><a...>...</a></li>
    <li id="linksomething"><a...>...</a></li>
    <li id="linksomethingelse"><a...>...</a></li>
    <li id="so_on"><a...>...</a></li>
    <li id="and_so_forth"><a...>...</a></li>
</ul>
  1. <ul id="menu">
  2.     <li id="linkhome"><a...>...</a></li>
  3.     <li id="linksomething"><a...>...</a></li>
  4.     <li id="linksomethingelse"><a...>...</a></li>
  5.     <li id="so_on"><a...>...</a></li>
  6.     <li id="and_so_forth"><a...>...</a></li>
  7. </ul>

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 15 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.