Jump to content

Web page failing validation


supertrucker

Recommended Posts

Line 17, Column 26: document type does not allow element "div" here; missing one of "button", "object", "noscript" start-tag.<div class="section_title">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>").
Any ideas as to why the validator is giving me this error? I'm obviously doing something wrong, but not sure what!ST
Link to comment
Share on other sites

Ok, no problem:

<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd"><html><head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <meta name="verify-v1" content="YkTu1mgJZM+YbQ4vYtJtpeEXh9ga4b44yoOH3IH8YsI=" /> <meta name="keywords" content="palm,pda,chat,news,search,portal,bookmarks,shortcuts,mobile,download,blog,games,travel,weather" /> <meta name="description" content="This is a mobile portal site with chat. Hundreds of great links to the best the mobile world has to offer! Come visit at: http://www.zerorubbish.com" /> <link rel="stylesheet" type="text/css" href="xhtml-mp.css" /> <link rel="shortcut icon" href="favicon.gif" /> <link rel="alternate" type="text/html" media="handheld" href="http://zerorubbish.mobi/" title="Mobile/PDA" /> <title>ZR 2.0 - Zero Rubbish dot com</title></head><body><div class="section_title">Zero Rubbish dot com</div> <div class="quick_links"> <a href="mybookmarks.php" accesskey="*">* My Bookmarks</a> <a href="index.php" accesskey="#"># Home</a> <a href="chat.php" accesskey="0">0 Chat</a> </div><a href="http://c.admob.com/t1.php/f50e04c74715e7e/S/1/48CD2FD700154F/e87874302a1062cf/t073/02bec388755eca39e2451bcc42e3cd04">Get 15 Bonus Ringtones For 1.0.7s!</a><br/><div class="note_message">Welcome back, admin!<br/>ZR now with chat! All you need to get started is an account, and then select Chat from the menu below!</div><hr/><br/><div class="section_divider"><b>Directory</b></div><br/><table width="100%"> <tr><td>1.</td><td><a href="directory.php?DirId=8" accesskey="$line">Business</a></td></tr><tr><td>2.</td><td><a href="directory.php?DirId=16" accesskey="$line">Download Sites</a></td></tr><tr><td>3.</td><td><a href="directory.php?DirId=7" accesskey="$line">Entertainment</a></td></tr><tr><td>4.</td><td><a href="directory.php?DirId=2" accesskey="$line">News</a></td></tr><tr><td>5.</td><td><a href="directory.php?DirId=4" accesskey="$line">Reference</a></td></tr><tr><td>6.</td><td><a href="directory.php?DirId=6" accesskey="$line">Search, Email, Portals & Directories</a></td></tr><tr><td>7.</td><td><a href="directory.php?DirId=9" accesskey="$line">Shopping</a></td></tr><tr><td>8.</td><td><a href="directory.php?DirId=12" accesskey="$line">Social</a></td></tr><tr><td>9.</td><td><a href="directory.php?DirId=3" accesskey="$line">Sports</a></td></tr><tr><td>10.</td><td><a href="directory.php?DirId=10" accesskey="$line">Technology</a></td></tr><tr><td>11.</td><td><a href="directory.php?DirId=1" accesskey="$line">Travel and Weather</a></td></tr></table><br/><div class="section_divider"><b>Admin Menu</b></div><br/><ul><li><a href="listusers.php">List Users</a></li><li><a href="listlinks.php">List Links</a></li><li><a href="listtags.php">List Tags</a></li><li><a href="addmenuitem.php">Add Menu Item</a></li><li><a href="listmenuitems.php">List Menu Items</a></li></ul><br/><div class="section_divider"><b>Menu</b></div><br/><ul><li><b><a href="chat.php">Chat</a></b></li><li><a href="mybookmarks.php">My Bookmarks</a></li><li><a href="youraccount.php">Your Account</a></li><li><b><a href="whatsnew.php">What's new?</a></b></li><li><a href="bookmarklets.php">Bookmarklets</a></li><li><a href="submitlink.php">Submit site to ZR Directory</a></li><li><a href="suggestionbox.php">Suggestion Box</a></li><li><a href="whosonline.php">Who Is Online?</a></li><li><a href="signout.php">Sign Out</a></li></ul> <hr/><b>Ads</b><a href="http://surfwap.com/?site=zero">Free Downloads Sites</a><hr/><a href="index.php"># Home</a></body></html>
Link to comment
Share on other sites

Disregard the php variable $line showing up for the access keys, this has been fixed but it was not the source of the validation failure... Still don't know what's causing it. It says I have 9 errors, all of them are the same for different elements.

Link to comment
Share on other sites

You're using a Doctype Declaration I'm not familiar with:

<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.2//EN" "http://www.openmobilealliance.org/tech/DTD/xhtml-mobile12.dtd">

I'm afraid I can't help you much more.From what I understand in the error message, you can only use <button>, <object> or <noscript> in the <body> element.

Link to comment
Share on other sites

Ok, I figured it out, the links and content all have to have containers; so added <div>s to it and now it passes 100%.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...