HTML - Help With This Validation Error, Please
Similar TutorialsHi all, I have recently begun updating my website to XHTML and I have encountered the following error and I am not sure what I am doing incorrectly. Any advice would be very welcome. http://www.dynamic-xchange.com/DXServices.php http://validator.w3.org/check?uri=ht...doctype=Inline Best Regards, Simon I have a web page that I still have 4 validation errors on (all for the same problem in different lines). The error lines and the validation error for them is below. Any ideas as to how to correct this would be appreciated. Thanks. HTML Code: <p align="left" style="line-height: 100%; margin-left: 0; margin-right: 0; margin-top: 3; margin-bottom: 3"><span style="mso-fareast-font-family: Times New Roman; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA"><b><font face="Times New Roman" size="5"> Page Title</font></b></span></p> <p align="left" style="line-height: 100%; margin-left: 0; margin-right: 0; margin-top: 3; margin-bottom: 3"><font face="Times New Roman" size="4" color="#000080"><i> </i></font></p> <p align="left" style="line-height: 100%; margin-left: 0; margin-right: 0; margin-top: 3; margin-bottom: 3"> </p> <p align="left" style="line-height: 100%; margin-left: 0; margin-right: 0; margin-top: 3; margin-bottom: 3"><i><font face="Times New Roman" size="4" color="#000080"> </font> Validation error: Below are the results of checking this document for XML well-formedness and validity. Error Line 44 column 111: document type does not allow element "p" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag. ...: 0; margin-top: 3; margin-bottom: 3"><span style="mso-fareast-font-family: T 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>"). Hello, I have coded my site, and I have a form on the page, and I'm not sure why I am getting the errors I am getting. If anyone can help me out I would be forever grateful! Here is my code: http://pastie.org/366071 And if you paste it into: http://validator.w3.org/#validate_by_input then you will see what errors I have encountered. My html is attached, I was wondering what I can do to fix what is wrong with my website! I can't see anything, but I do know that two of the buttons don't work, most likely because of the website not being validated. Any help is appreciated! BTW, just remove the .txt for it to become an html doc. to validate it just try this: http://validator.w3.org/ I don't know what the errors mean: HTML Code: No Character Encoding Found! Falling back to UTF-8. None of the standards sources gave any information on the character encoding labeling for this document. Without encoding information it is impossible to reliably validate the document. As a fallback solution, the "UTF-8" encoding was used to read the content and attempt to perform the validation, but this is likely to fail for all non-trivial documents. Read the FAQ entry on character encoding for more details and pointers on how to fix this problem with your document. Unable to Determine Parse Mode! The validator can process documents either as XML (for document types such as XHTML, SVG, etc.) or SGML (for HTML 4.01 and prior versions). For this document, the information available was not sufficient to determine the parsing mode unambiguously, because: the MIME Media Type (text/html) can be used for XML or SGML document types No known Document Type could be detected No XML declaration (e.g <?xml version="1.0"?>) could be found at the beginning of the document. No XML namespace (e.g <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">) could be found at the root of the document. As a default, the validator is falling back to SGML mode. No Character encoding declared at document level No character encoding information was found within the document, either in an HTML meta element or an XML declaration. It is often recommended to declare the character encoding in the document itself, especially if there is a chance that the document will be read from or saved to disk, CD, etc. See this tutorial on character encoding for techniques and explanations. Validation Output: 1 Error Line 1, Column 1: end of document in prolog ✉ This error may appear when the validator receives an empty document. Please make sure that the document you are uploading is not empty, and report any discrepancy. Code: Parse error: syntax error, unexpected T_DNUMBER in /home/a6989956/public_html/include/database.php on line 24 Can anyone please tell me whats wrong? Here is line a few lines Code: class MySQLDB { var $connection; //The MySQL database connection var $num_active_users; //Number of active users viewing site var $num_active_guests; //Number of active guests viewing site var $num_members; //Number of signed-up users /* Note: call getNumMembers() to access $num_members! */ /* Class constructor */ function MySQLDB(){ /* Make connection to database */ $this->connection = mysql_connect(hostname, username, ********) or die(mysql_error()); mysql_select_db(database, $this->connection) or die(mysql_error()); /** * Only query database to find out number of members * when getNumMembers() is called for the first time, * until then, default value set. */ $this->num_members = -1; if(TRACK_VISITORS){ /* Calculate number of users at site */ $this->calcNumActiveUsers(); /* Calculate number of guests at site */ $this->calcNumActiveGuests(); } } line 24-25 is Code: $this->connection = mysql_connect(hostname, username, ********) or die(mysql_error()); mysql_select_db(database, $this->connection) or die(mysql_error()); PLEASE HELP! I have paid a French website company to write a website for me. I validated it using WW3's Validation service and saw loads of errors on every page. The declared doc type is XHTML 1 Trans. It said there were Meta tags in uppercase and not closed properly, nesting errors, tags not allowed and more. The company told me their code was written with Dreamweaver 8 and was correct. They pointed out that if I validated Google's or Firefox's or Microsoft's main page, they will and do show errors. WW3s page validates correctly! So what is the value of WW3 validation and is "bad" code in this case bad? Will it not work in some browsers? For the moment I have no answer to give them. The site, which is half-live (!), is http://www.villa-stbarths.com. I wrote another website myself http://henry-bar.net which has no errors (I corrected them all) and it works fine. Can anyone explain or answer the question "Will a WW3 invalid xhtml wesite work on all browsers"? Henry Hi! I really need some help trying to figure out why these are errors my website looks perfect, and how can i resolve those errors. http://validator.w3.org/check?uri=http%3A%2F%2Fwww.combbat21.com%2Fnoindex.php&charset=%28detect+automatically%29&doctype=In line&group=0 Thanks!!! I'm validating a page but i get these errors. They're probably simple things but validation isn't my strong point. This is my code. I just pasted it all since i didn't know where it starts and stops. Code: <body> <div id="header"> <div style="float:left;"><a href="#"><img src="images/foto1.gif" alt=" " width="152" height="127" class="m1" /></a></div> <div style="float:left;"><a href="index.html"><img src="images/header.jpg" alt=" " width="405" height="102" /></a><img class="m3" alt="" src="images/spacer.gif" height="0" style="display:block;"/><a href="index.html"><img src="images/home1.jpg" alt=" " width="102" height="41" onmouseover="this.src='images/home.jpg'" onmouseout="this.src='images/home1.jpg'"/></a><a href="our-menu.html"><img src="images/menu.jpg" alt=" " width="100" height="41" onmouseover="this.src='images/menu1.jpg'" onmouseout="this.src='images/menu.jpg'"/></a><a href="our-services.html"><img src="images/services.jpg" alt=" " width="101" height="41" onmouseover="this.src='images/services2.jpg'" onmouseout="this.src='images/services.jpg'"/></a><a href="contact-us.html"><img src="images/contact3.jpg" alt=" " width="102" height="41"/></a></div> <div style="float:left;"><a href="#"><img src="images/rotateimages.gif" alt=" " width="152" height="127" class="m2" /></a></div> </div> <!-- \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ End Header \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ --> <div id="cont"> <div> <div class="left"> <div class="about"> <div><img src="images/spacer.gif" alt=" " width="1" height="19" /></div> <div class="font1" style="height:58px;"><strong class="font3">Lorem ipsum</strong> <strong class="font2">dolor sit et</strong><br/>amet consetetur elitr seder diam nonumy eirmod.</div> <div class="font1" style="line-height:15px;"><span class="font3">Address:</span><br/> 1234, Joondalup Drive, JOONDALUP<br/>WA6001 <span class="font3"/><br/> General Phone: <br /> +9555-5555<br/> <span class="font3">Reservations:</span> <br /> +9555-5556<br/> <br/> <span class="font3">email:</span><br/> <a href="mailto:" class="link2">lorem@ipsum.dolor</a><br/> <span class="font3">web:</span> <a href="#" class="link2">www.lorem.ipsum.dolor</a> </div> </div> </div> <div class="m4"><img src="images/foto5.gif" alt=" " width="152" height="127" /></div> </div> <!-- \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ End left \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ --> <div> <div class="center"> <div class="wel"> <div><img src="images/spacer.gif" alt=" " width="1" height="30" /></div> <div class="m8"> <div class="font2" style="height:44px;"><img src="images/border_l.gif" alt=" " width="11" height="26" style="float:left;" /><strong>Contact Us</strong> - Fill out the form below and we will endeavour to respond to your email as soon as possible.</div> <div style="width:335px;"> <p class="font2"><strong>Name</strong> - Please fill in your name.</p> <form id="form1" name="form1" method="post" action=""> <label> <input type="text" name="textfield" id="textfield" /> </label> </form> <p class="font2"><strong>Phone</strong> - Please write down your phone number so we can contact you.</p> <form id="form2" name="form2" method="post" action=""> <label> <input type="text" name="textfield2" id="textfield2" /> </label></form><p> Line 57 is here <form id="form4" name="form4" method="post" action=""> <label> <input type="submit" name="button" id="button" value="Send" /> </label> </form> </div> </div> </div> </div> <div id="footer"> <div style="text-align:center;"><img alt="" src="images/spacer.gif" height="8" style="display:block "/><a href="index.html" class="link2">Home</a> | <a href="our-menu.html" class="link2">Our Menu</a> | <a href="our-services.html" class="link2">Our Services</a> | <a href="contact-us.html" class="link2">Contact Us</a></div> <div style="text-align:center"><img alt="" src="images/spacer.gif" height="19" style="display:block "/>© Copyright 2008. All rights reserved.</div> </div> </div> <!-- \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ End Center \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ --> <div class="right"> <div> <div class="order"> <div> <div class="font3"><img src="images/spacer.gif" alt=" " width="1" height="8" />We Call You </div> <div class="form3 m6"> <form action="" method="post" name="form3"> <div> <div style="width:112px; float:left;" class="font4">Name</div> <div style="float:left; width:112px;"><input name="1" type="text" onclick="this.value=''" /></div> <div style="width:112px; float:left; margin-top:7px;" class="font4">Phone Number</div> <div style="width:112px; float:left; margin-top:0px;"><input name="1" type="text" onclick="this.value=''" /></div> </div> </form> </div> </div> </div> <div> <div class="m7"> <div><img src="images/spacer.gif" alt=" " width="1" height="13" /></div> <div class="font1" style="text-align:right"><img alt="" src="images/spacer.gif" height="4" style="display:block "/><strong class="font5" style="text-align:left">Lunch</strong> <strong class="font3">Tuesday-Friday</strong><img alt="" src="images/spacer.gif" height="1" style="display:block "/><span style="padding-left:44px;">11:00am-3:30pm</span><img alt="" src="images/spacer.gif" height="4" style="display:block "/></div> <div class="font1" style="text-align:right"><strong class="font5">Dinner</strong> <strong class="font3">Sunday-Thursday</strong><img alt="" src="images/spacer.gif" height="2" style="display:block "/><span style="padding-left:44px;">4:00pm-9:00pm</span></div> <div class="font1" style="text-align:right"><img alt="" src="images/spacer.gif" height="4" style="display:block "/><strong class="font3">Sunday-Thursday</strong><img alt="" src="images/spacer.gif" height="2" style="display:block "/><span style="padding-left:44px;">4:00pm-9:00pm</span><img alt="" src="images/spacer.gif" height="5" style="display:block "/></div> </div> </div> </div> <div class="m5"><img src="images/foto8.gif" alt=" " width="152" height="127"/></div> </div> <!-- \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ End Right \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ --> </div> <!-- \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ End Header \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ --> <!--div id="footer"></div--> </body> Can someone help me out? Validation - Just how far should you go? I've sat and started the seemingly longwinded process of validation (xhtml & css) - once you get going it's not as bad as it looks! My question is - just how far should you go? Site Check lists a million things to look at... just where do you stop? is W3C enough? Also how much attention should you be paying to IE's 'Done but with errors on the page' - see attached picture My validated xhtml My validated CSS My Page Hello Webmasters I need someones Help on this I am using this Doctype Type on my Index and every time I try to Valid with w3c and it it keeps comming back with these errors <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> Saying there is no attribute "( height="94" )And No Attribute In( BACKGROUND ) Can One Of You Webmasters Tell Me What Doctype To Use Or How To Fix The Errors. I For Got tell you The errors are in the Table Codes this is what they look like <table width="100%" height="94" cellpadding="0" cellspacing="0" border="0"> width="100%" height="94" background="http://www.rons-free-games.com/index-fo Thank You Palerider Hello, I am finally getting around the topping off the cake if you will and validating my site. I am having trouble understanding some of the validation errors. What I'll do is link you to the validation and then tell you which ones I am having trouble understanding. http://validator.w3.org/check?uri=http%3A%2F%2Fwww.scubatoo.net%2Findex.php&charset=%28detect+automatically%29&doctype=Inlin e&group=0 And the ones I am having trouble with and can't quite figure out how to fix are, Actually on second thought, I don't quite understand a majority of them. Is there a way I can refrence these problems on a website? Thanks, Ryan I'm trying to validate my html (I've already validated my css), and I keep getting these two errors: there is no attribute "target". ...ref="http://www.freewebs.com" target="_blank">freewebs</a> AND: document type does not allow element "hr" here; missing one of "object", "ins", "del", "map", "button" start-tag. The Navigation: Yay! <br /><hr /><br /> I really don't understand the target="_blank" issue, and I don't know enough about hr's to complain about the second one, so does anyone care to explain? Can someone please run the following page through the W3C for me so you can see the errors that come up and tell me if it is important I change them? The errors look like they are all resulting from a javascript I am using. I don't know how to fix it. Im hoping it doesn't matter. thanks I need help with w3c validator, the validator gives me error for tghe following code: <td background= "http://wwwxyz.com/image-files/top.jpg"✉ You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead). This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information. Can someone suggest me a way to rectify this. Thanks I am doing a slow process after each section I add make sure it validates, however despite all that it claims Sorry, I am unable to validate this document because its content type is application/octet-stream, which is not currently supported by this service. The Content-Type header is sent by your web server (or web browser if you use the file upload interface) and depends on its configuration. Commonly, web servers will have a mapping of filename extensions (such as ".html") to MIME Content-Type values (such as text/html). That you received this message can mean that your server is not configured correctly, that your file does not have the correct filename extension, or that you are attempting to validate a file type that we do not support yet. In the latter case you should let us know that you need us to support that content type (please include all relevant details, including the URL to the standards document defining the content type) using the instructions on the Feedback Page. However my code shows Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-type" content="text/html; charset=iso-8859-1" /> <meta name="author" content="Mordecai" /> <title>Rigganmore - Land of a Thousand Dreams</title> <meta name="author" content="Mordecai" /> <title>Rigganmore - Land of a Thousand Dreams</title> <link type="text/css" rel="stylesheet" href="stylesheet/general.css" /> <link type="text/css" rel="stylesheet" href="stylesheet/default.css" /> </head> <body> <div id="wrapper"> <div id="header"> </div> </div> </body> </html> Note: the Mime shows text/html not "application/octet-stream" as it claims and charset is there also. Please can someone help me? seriously i thought i was pretty decent at html but ive barely done much in recent months/years. http://validator.w3.org/#validate_by_uri and then type: http://www.numyspace.co.uk/~unn_s014557/index.htm i have no idea why there are so many errors. i primarily used dreamweaver for the code so i thought there wouldnt be many problems. http://validator.w3.org/check?uri=ww...%2Faboutme.php any idea how to fix that or even what the problem is? I did close the div, and body, unless im looking at it wrong. thanks |