Cetanu Posted August 11, 2009 Share Posted August 11, 2009 http://validator.w3.org/check?uri=http%3A%2F%2Fmythscape.freezoka.com&charset=%28detect+automatically%29&doctype=Inline&group=0 I have a couple of questions: Why doesn't my site validate? I don't understand W3C's rules. For example, "# # Error Line 38, Column 3: document type does not allow element "p" here; missing one of "object", "ins", "del", "map", "button" start-tag" Well what does that mean?! I read their explanations, but it doesn't make sense. Am I using <p> wrong? It says that sort of thing a lot, and I just don't get it. Help? Quote Link to comment Share on other sites More sharing options...
haku Posted August 12, 2009 Share Posted August 12, 2009 Do you expect us to magically guess what your code looks like to solve your problem? Quote Link to comment Share on other sites More sharing options...
Cetanu Posted August 12, 2009 Author Share Posted August 12, 2009 No, but I'll give you a snippet it declares wrong (sorry I forgot ). ...ottom:1px solid #000; padding: 5px;"><a href="/demon/dmain.php">>>Demonology For this it tells me: document type does not allow element "div" here; missing one of "object", "ins", "del", "map", "button" start-tag Other than that, in the validation results it shows the little bits of code it scrutinizes and then tells you why, but I don't get their stupid reasoning. Quote Link to comment Share on other sites More sharing options...
sawade Posted August 12, 2009 Share Posted August 12, 2009 Without seeing at least a few lines of code before this one. <a href="/demon/dmain.php">>> What are the extra 2 >> for? Where is the closing tag for a? (</a>) Quote Link to comment Share on other sites More sharing options...
Cetanu Posted August 12, 2009 Author Share Posted August 12, 2009 I use the >> for the link to appear like >>Demonology.. I'll just paste in a lot of the code that doesn't validate XD <div style="width: 100%; border: 1px dashed #999; padding: 5px; margin: 10px;"> document type does not allow element "div" here; missing one of "object", "ins", "del", "map", "button" start-tag <p>Cryptids, animals that haven't been.... document type does not allow element "p" here; missing one of "object", "ins", "del", "map", "button" start-tag <label for="username">Username</label> document type does not allow element "label" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag Stuff like that shizen. Quote Link to comment Share on other sites More sharing options...
haku Posted August 12, 2009 Share Posted August 12, 2009 Mate, give us five lines before the line that doesnt validate, the line that doesnt validate, and five lines after. These tiny little snippets aren't enough to see anything. Quote Link to comment Share on other sites More sharing options...
sawade Posted August 12, 2009 Share Posted August 12, 2009 Haku is right. We need blocks of code. The lines you give may not actually hold the error, it could be before or after that line. For this one: <label for="username">Username</label> This is an inline element it needs to be nested inside of a block element. Example: <td><label for="mname">MI</label><br /> <input type="text" name="mname" id="mname" class="textbox" maxlength="2" size="4" value="" /> </td> <td> tags are inside a <table> tag. Another example: <p>Hi I am <label for="joe">joe</label>.</p> Quote Link to comment Share on other sites More sharing options...
Cetanu Posted August 12, 2009 Author Share Posted August 12, 2009 <div style="margin-left: 70%; padding: .555em;"><a href='registration.php'>Register Today!</a> </div> <div id="content"> <div id="page"> <p style="text-align: right;"> <div style="width: 100%; border: 1px dashed #999; padding: 5px; margin: 10px;"> <a href="linkus.php">Contribute to MythScape by linking us to your website, blog, signature, etc.! You can join in and help, and we will also advertise your site here. Just click this line of text!</a> </div> <div style="width: 100%; border: 1px dashed #999; padding: 5px; margin: 10px;"> PS I think I had the wrong idea of <label> Quote Link to comment Share on other sites More sharing options...
sawade Posted August 12, 2009 Share Posted August 12, 2009 <div style="margin-left: 70%; padding: .555em;"> <p><a href='registration.php'>Register Today!</a></p> </div> <div id="content"> <div id="page"> <p style="text-align: right;"></p> <div style="width: 100%; border: 1px dashed #999; padding: 5px; margin: 10px;"> <p><a href="linkus.php">Contribute to MythScape by linking us to your website, blog, signature, etc.! You can join in and help, and we will also advertise your site here. Just click this line of text!</a></p> </div> </div> </div> Try this. Further, the 'a' element is inline it MUST be in a block element. Suggestion: put your styles in a css, either internal or external whichever. And the 2nd p with link that starts "Contribute..." make only one or two words actually link, not the whole paragraph. It's tacky. Hope this helps. Also- <a href='registration.php'> use double quotes "" Quote Link to comment Share on other sites More sharing options...
Cetanu Posted August 12, 2009 Author Share Posted August 12, 2009 <div style="margin-left: 70%; padding: .555em;"> <p><a href='registration.php'>Register Today!</a></p> </div> <div id="content"> <div id="page"> <p style="text-align: right;"></p> <div style="width: 100%; border: 1px dashed #999; padding: 5px; margin: 10px;"> <p><a href="linkus.php">Contribute to MythScape by linking us to your website, blog, signature, etc.! You can join in and help, and we will also advertise your site here. Just click this line of text!</a></p> </div> </div> </div> Try this. Further, the 'a' element is inline it MUST be in a block element. Suggestion: put your styles in a css, either internal or external whichever. And the 2nd p with link that starts "Contribute..." make only one or two words actually link, not the whole paragraph. It's tacky. Hope this helps. Also- <a href='registration.php'> use double quotes "" Okay, thanks for that. I'll fix those sorts of problems and then try and validate. Quote Link to comment Share on other sites More sharing options...
Cetanu Posted August 13, 2009 Author Share Posted August 13, 2009 Great news! Thanks to sawade I have managed to get the home page down to 5 errors. One error is because it won't let me use target="_blank", but I don't plan on getting rid of that so screw them. The other four are because my free host inserts a javascript thing at the bottom of all my pages and they have some errors in their code. W3C doesn't like their code so I'll have to live with the never-able-to-be-valid code. :'( BUT THANKS! Now I know what I was doing wrong. Quote Link to comment Share on other sites More sharing options...
haku Posted August 13, 2009 Share Posted August 13, 2009 Please don't use target, it's really annoying for users. You should let the user decide if they want to open the link in a new window, you shouldn't decide for them. Quote Link to comment Share on other sites More sharing options...
Cetanu Posted August 13, 2009 Author Share Posted August 13, 2009 Please don't use target, it's really annoying for users. You should let the user decide if they want to open the link in a new window, you shouldn't decide for them. It's for my RSS feed because there's no way of returning to my website if you click on the button....except the back button, but that could potentially mess with logging in (resending information, etc.) I only use it once on the whole site. Quote Link to comment Share on other sites More sharing options...
sawade Posted August 13, 2009 Share Posted August 13, 2009 Good to hear. Quote Link to comment Share on other sites More sharing options...
infiniteacuity Posted August 14, 2009 Share Posted August 14, 2009 I use the >> for the link to appear like >>Demonology.. You should use > in place of > if you want that to be part of your link text. Quote Link to comment Share on other sites More sharing options...
Cetanu Posted August 14, 2009 Author Share Posted August 14, 2009 Oh, okay. Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.