HTML - W3c Validation For A Page?
hi
Suppose am told to do the validation for a site ex: www.xyz.com should I validate only xyz.com or xyz.com/about.html ? I mean should I validate only the above url or all inner pages like about, contact, profile etc......(whole site)?? Similar TutorialsHi, I'm trying to debug some code and, in spite of running it cleanly through the W3C validator, still have some big issues. The site runs fine in Chrome but displays incorrectly in IE and FireFox. You can see the site at www.iwailingwall.com Firefox is giving the following error: Error: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.statusText]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: file:///C:/Program%20Files/Mozilla%20Firefox/components/nsBlocklistService.js :: anonymous :: line 548" data: no] Source File: file:///C:/Program%20Files/Mozilla%20Firefox/components/nsBlocklistService.js Line: 548 IE is not showing any errors. I would really appreciate any help on the display issue as well as a pointer to browser-specific code validators if they exist. Thanks in advance for any help you can provide. Please let me know if I can provide any additional information to assist in a diagnosis. The problematic code is: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>The Wailing Wall</title> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <!-- SWFObject embed by Geoff Stearns geoff@deconcept.com http://blog.deconcept.com/swfobject/ --> <script type="text/javascript" src="swfobject.js" /> <style type="text/css"> textarea#styled { width: 600px; height: 120px; border: 3px solid #cccccc; padding: 5px; font-family: Tahoma, sans-serif; background-color: rgb(255,255,204); background-position: bottom right; background-repeat: no-repeat; } body { padding: 20px; background-color: rgb(238, 238, 238); font-family: Calibri; font-size: larger; color: rgb(255, 255, 204); font-weight: bolder; text-align: center; } </style> </head> <body style="background-image: url(HortonRockWall2.jpg);text-align:center;"> <table align="center"> <tr> <td> </td> <td align="left" > <font size="8" />The Wailing Wall <br /> <font size="4" />Tuck your worries here, snug among all our worries. <br />We'll keep them safe so you can let them go. </td> <td> </td> </tr> <tr> <td> </td> <td><table><tr><td> <div id="flashcontent">This will be shown to users with no Flash or Javascript.</div> <script type="text/javascript"> var myWidth = 0, myHeight = 0; var maxHeight = 0; myWidth = 600; myHeight = 600; if (myWidth > myHeight) maxHeight = .75* myHeight; else maxHeight = .75* myWidth; var so = new SWFObject("tagcloud.swf", "tagcloud", maxHeight, maxHeight, "7", "#000000"); // uncomment next line to enable transparency so.addParam("wmode", "transparent"); so.addVariable("tcolor", "0xFFFFCC"); so.addVariable("mode", "tags"); so.addVariable("distr", "true"); so.addVariable("tspeed", "60"); so.addVariable("tagcloud", "%3Ctags%3E%3Ca+href%3D%27%2Findex.php%3Fid%3D98%27+style%3D%2710%27%3EAdd+to+the+wall+here....%3C%2 Fa%3E%3Ca+href%3D%27%2Findex.php%3Fid%3D97%27+style%3D%2710%27%3EAdd+to+the+wall+here....%3C%2Fa%3E% 3Ca+href%3D%27%2Findex.php%3Fid%3D96%27+style%3D%2710%27%3EI+hate+meetings+about+meetings...%3C%2Fa% 3E%3Ca+href%3D%27%2Findex.php%3Fid%3D94%27+style%3D%2710%27%3EI+am+worried+that+the+recessio...%3C%2 Fa%3E%3Ca+href%3D%27%2Findex.php%3Fid%3D84%27+style%3D%2710%27%3EI+think+that+this+is+a+really+...%3 C%2Fa%3E%3Ca+href%3D%27%2Findex.php%3Fid%3D75%27+style%3D%2710%27%3EI+often+worry+that+I+am+a+****.. .%3C%2Fa%3E%3Ca+href%3D%27%2Findex.php%3Fid%3D74%27+style%3D%2710%27%3EI+worry+that+I%27ve+spent+4+y ea...%3C%2Fa%3E%3Ca+href%3D%27%2Findex.php%3Fid%3D73%27+style%3D%2710%27%3EI+worry+that+my+son+is+in heren...%3C%2Fa%3E%3Ca+href%3D%27%2Findex.php%3Fid%3D72%27+style%3D%2710%27%3EOne+worry+I+have+is+th at+someo...%3C%2Fa%3E%3Ca+href%3D%27%2Findex.php%3Fid%3D71%27+style%3D%2710%27%3EI+am+worried+about+ the+possibi...%3C%2Fa%3E%3Ca+href%3D%27%2Findex.php%3Fid%3D70%27+style%3D%2710%27%3EWhen+this+electi on+is+over%2C+I+...%3C%2Fa%3E%3Ca+href%3D%27%2Findex.php%3Fid%3D69%27+style%3D%2710%27%3EI+am+worrie d+about+what+I+am+g...%3C%2Fa%3E%3Ca+href%3D%27%2Findex.php%3Fid%3D68%27+style%3D%2710%27%3EIt%27s+f all+again+and+the+weath...%3C%2Fa%3E%3Ca+href%3D%27%2Findex.php%3Fid%3D67%27+style%3D%2710%27%3EI%27 m+worried+about+what%27s+goi...%3C%2Fa%3E%3Ca+href%3D%27%2Findex.php%3Fid%3D66%27+style%3D%2710%27%3 EHopefully+this+isn%27t+meta-ana...%3C%2Fa%3E%26nbsp%3B%26nbsp%3B+%3Ca+href%3D%27%2Findex.php%3Fpage%3D2%27+style%3D%2710%27%3ENe xt%3C%2Fa%3E++%3Ca+href%3D%27%2Findex.php%3Fpage%3D2%27+style%3D%2710%27%3ELast+Page%3C%2Fa%3E+%3Ca+ href%3D%27%2Findex.php%27+style+%3D%2710%27%3EReturn+to+main+page.%3C%2Fa%3E%3C%2Ftags%3E");so.write ("flashcontent"); </script> </td></tr> <tr><td align="center"> <font size='2' />Based on WP-Cumulus by <a href="http://www.roytanck.com/">Roy Tanck</a></td></tr> </table></td> <td valign='top'> <table style="width: 407px; margin-left: 30px; border-width:3;"> <tr> <td style="width: 383px;"> <form action='/index.php' method='post' name='contact_form' /> <textarea name="body" rows="5" cols="40">Add to the wall here.</textarea> </td> </tr> <tr> <td style="width: 383px;"><font size="3" />By: <input name="name" value="Anonymous" type="text" /><input value="Submit" name="Submit" type="submit" /><input value="Reset" name="Reset" type="reset" /> </td> </tr> <tr> <td style="width: 383px;"> <input name='reference' type='hidden' value='0' />What do you need to let go of? </td> </tr> </table> </td> </tr> </table> </body> </html> My web site main page is basically www.website.com/index.php. I am told that I can validate a php file. So I went to validator.w3.org, plugged in my url and got the error: No DOCTYPE found, and unknown root element. Aborting validation. So I added "<!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-us' lang='en-us'>" to the top of my php file and got errors. In a php forum I was tolf to put the <session_start();> at the begining of the file. This took care of the php errors, but still the validator shows No DOCTYPE found, and unknown root element. Aborting validation. Can someone please help me with validation? Here is what the php file looks like now, thanks: Code: <session_start();> <!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-us' lang='en-us'> <?php /** * @file: index.php * @author * @description: main page */ include_once "db_config.php"; include_once "classes/system.php"; include_once "classes/main_menu.php"; include_once "classes/tools.php"; $command = tools::get_field_value("command"); $param = tools::get_field_value("param"); $main_menu = new main_menu($system); $content = $main_menu->parse_command($command,$param); echo $content; ?> 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 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? 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 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. 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 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? 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'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? 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 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!!! 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 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 Hi guys, Im trying to get the following section of code to validate. However I have no idea what is wrong with it.. Code: <a href="#" target="_blank" onclick="openLiveHelp(); return false"><img src="http://www.mydomain.co.uk/livehelp/include/status.php" id="LiveHelpStatus" name="LiveHelpStatus" border="0" alt="Live Help" onload="statusImagesLiveHelp[statusImagesLiveHelp.length] = this;"/></a> This code is entered in the body of the page. The doctype is.. Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> The error I am getting with the validator is.. Quote: there is no attribute "onload". ...s" border="0" alt="Live Help" onload="statusImagesLiveHelp[statusImagesLiveHe 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. How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute. If you received this error when using the <embed> element to incorporate flash media in a Web page, see the FAQ item on valid flash. Any help with this would be appreciated. Many thanks. Dan Can anyone let me know what my problem is here please? Error Line 8 column 24723: document type does not allow element "P" here; missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON" start-tag. ...ear:</strong> 2005</p><p align="left" > <strong>Season:</strong> Spring</p><p a I'm trying to get this page to validate with the w3c, but there's something wrong with the playlist.I know it has to do with xhtml strict, but I didn't write the playlist code, I just copied and pasted it from playlist.com. So now I need to know what to change to make it validate. Also, if anyone knows about a better place to get an embeddable playlist that would be welcome. |