I got errors with w3c validation for html with javasript and it variables definitions are not good for w3c validation. These javascript codes are from ad snippets from ad company on my sites which I can't change. Please tell me how to fix the error. john3825
You can use tags to exclude JavaScript from validators. start tag is: //<![CDATA[ end tag is: //]]> This is an example of how I use it: [TABLE="class: cms_table"] [TR] [TD="class: cms_table_webkit-line-content"] <script type="text/javascript">[/TD] [/TR] [TR] [TD="class: cms_table_webkit-line-number"][/TD] [TD="class: cms_table_webkit-line-content"]//<![CDATA[[/TD] [/TR] [TR] [TD="class: cms_table_webkit-line-number"][/TD] [TD="class: cms_table_webkit-line-content"]$.easing.custom = function (x, t, b, c, d) {[/TD] [/TR] [TR] [TD="class: cms_table_webkit-line-number"][/TD] [TD="class: cms_table_webkit-line-content"] var s = 1.20158;[/TD] [/TR] [TR] [TD="class: cms_table_webkit-line-number"][/TD] [TD="class: cms_table_webkit-line-content"] if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;[/TD] [/TR] [TR] [TD="class: cms_table_webkit-line-number"][/TD] [TD="class: cms_table_webkit-line-content"] return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;[/TD] [/TR] [TR] [TD="class: cms_table_webkit-line-number"][/TD] [TD="class: cms_table_webkit-line-content"]}[/TD] [/TR] [TR] [TD="class: cms_table_webkit-line-number"][/TD] [TD="class: cms_table_webkit-line-content"]$("div.scrollable").scrollable({easing: 'custom', speed: 1800, circular: true});[/TD] [/TR] [TR] [TD="class: cms_table_webkit-line-number"][/TD] [TD="class: cms_table_webkit-line-content"]//]]>[/TD] [/TR] [TR] [TD="class: cms_table_webkit-line-number"]</script>[/TD] [TD="class: cms_table_webkit-line-content"] [/TD] [/TR] [/TABLE] Hope this helps!
How to put cdata within javascript codes? You can check the w3c result by bit.ly/H7zuPj error; Also, please tell me how to fix the other errors. 44 errors and 15 warnings.
You can't put too much text. Image is too big. How to put cdata within javascript codes to avoid w3c validation errors on javascripts since xhtml read linked server data which are not defined by xhtml schema? It's too much to put additional xml files on my server to define all xml items from linked ad pages.ex;
I need to put cdata or something to avoid validation errors since xhtml item definition errors occur with linked data from ad snippets. You can't avoid errors with xhtml errors with items from linked server which doesn't belongs to me. The snippets are necessary to put ad codes on my website though though there are many items defined on the linked server only for xhtml.
No within the javascript tag. ex; w3c err message; html; Not outside the tag like <javascript src="">serid</javascript>
john3825, you're heading down the wrong path here. You have the wrong Doctype set, so it's trying to validating as XHTML 1.0 Transitional when it's actually HTML 5 that you need. The only errors are that you have a div with microdata inside the head of the document, an onload all wrong on the body tag, and some random meta tags (the Content-Script-Type ones).
W3C validation can let you know if there are any errors in your document and give some clues for fixing the errors. Read them carefully and try to fix them one by one. As the problem above try to change the character: & Code (markup): with html entity code: & Code (markup): So it should look like this: <script src='http://www.super-clix.com/adserver8strip.php?userid=9146&serid=XBVZZTXP691204Z&channelid=john3825' type='text/JavaScript'></script> Code (markup): The browser will render it as the original code.
How to avoid validation errors from definition errors for xhtml 1.0? I want to use xhtml 1.0 for my website since it's good for xml and html. Xhtml file needs definition file dtd which define xhtml 1.0 document objects. The problem with the validation is from not defining the objects on the documents since xhtml reads definition and objects linked on the documents. The ad snippets are for html 4 or 5, and not for xhtml. They do not use xhtml grammars to put variables on the link reference objects. The w3c documents with the errors is bit.ly/H7zuPj . Please tell me how to fix that.
iam using wordpress theme.also i modified the theme.Do i need to validate the site ? If i validate and correct the code, will i get more traffic?
You should validate html grammar for Serps and your website performance. Html grammar errors make websites slow and collapsed somehow, and may be crash someday. SERPs from search engines do not list websites with grammar errors by requirements. If you do SEO they will ask you to correct and validate them also. So, it might bring more traffic by putting your serp ranks higher.