The\nJavaScript used on this page provides a quick link that allows\nvisitors to automatically bookmark this page. As an alternative,\nplease use your browser’s Bookmark This Page feature.\n\n\nFlashing or flickering element(s) detected, such as animated\nGIFs, Java applets, and other multimedia plug-ins\nAdjust the speed of any animations to avoid causing the screen\nto flicker with a frequency between 2 Hz and 55 Hz. Animations that\nexceed these two measures may cause seizures in visitors with\nphotosensitive epilepsy.\n\n\nNo DOCTYPE specified\nAdd a valid DOCTYPE above the opening\n tag.\n\n\nNo HTTP charset parameter specified\nThis special meta tag specifies the character set used in the\nHTML code. Some HTML editors include it automatically when\ngenerating new blank web pages. If validation finds that this tag\nis missing from your HTML or XHTML code, insert the following code\nby hand: . For HTML5, insert .\n\n\nNo </span> tag specified</td>\n<td>Add a unique title between <span\nclass=\"code\"><title></span> tags in the head area on each\npage.</td>\n</tr>\n<tr>\n<td>No <span class=\"code\"><meta></span> tags specified</td>\n<td>Add meta keywords and meta description tags to the head of each\npage. These can be identical on every page on the site. If desired,\nyou may also add additional meta tags as needed.</td>\n</tr>\n<tr>\n<td>No Robots tags specified</td>\n<td>Add the <span class=\"code\">Robots</span> <span\nclass=\"code\"><meta></span> tag in the head of the page to\ninstruct web spiders and robots whether to index the page and\nfollow any hyperlinks, such as <span class=\"code\"><meta\nname=”Robots” content=”All”></span>.</td>\n</tr>\n<tr>\n<td>Deprecated <span class=\"code\"><font></span> tags\ndetected</td>\n<td>Move all the presentation markup of the HTML (page, fonts,\ntables, links, and so on) to an external CSS file and remove all\n<span class=\"code\"><font></span> tags and HTML and inline\nformatting attributes.</td>\n</tr>\n<tr>\n<td>Deprecated table height attribute detected</td>\n<td>Control table cell heights, when necessary, with CSS\nstyles.</td>\n</tr>\n<tr>\n<td>Style attributes detected in the opening <span\nclass=\"code\"><body></span> tag</td>\n<td>Move <span class=\"code\">body</span> attributes, like margin\nattributes and background page color, to a BODY tag redefine style\nin an external CSS file.</td>\n</tr>\n<tr>\n<td><span class=\"code\">type</span> attribute not specified for\nJavaScript or CSS</td>\n<td>Add the <span class=\"code\">type=”text/css”</span>\nattribute for <span class=\"code\"><style></span> tags and the\n<span class=\"code\">type=”text/javascript”</span>\nattribute for <span class=\"code\"><script></span> tags: <span\nclass=\"code\"><style type=”text/css” ><script\ntype=”text/javascript”></span>.</td>\n</tr>\n<tr>\n<td>Entity name used instead of entity number</td>\n<td>Change the entity name to an entity number, such as using <span\nclass=\"code\">$#169;</span> instead of <span\nclass=\"code\">©</span> to create the copyright symbol\n(c).</td>\n</tr>\n<tr>\n<td>No background color attribute was specified for a CSS style\nthat specifies text color</td>\n<td>Provide each style that contains a text <span\nclass=\"code\">color</span> attribute with an attending background\n<span class=\"code\">color</span> attribute. The background color\nshould match, or closely match, the background color upon which the\ntext will display on.</td>\n</tr>\n</table>\n<p>When you’re finished identifying and adjusting all the noncompliant code identified by the validation tools, and have fixed everything that needed fixing, move on to the retesting and acceptable failure phase of the testing process.</p>","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https://www.dummies.com/article/technology/programming-web-design/general-programming-web-design/how-to-fix-noncompliant-code-on-your-web-page-166201/"]}]},{"@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://www.dummies.com/"},{"@type":"ListItem","position":2,"name":"Technology","item":"https://www.dummies.com/category/articles/technology-33512"},{"@type":"ListItem","position":3,"name":"Programming Web Design","item":"https://www.dummies.com/category/articles/programming-web-design-33592"},{"@type":"ListItem","position":4,"name":"General Programming Web Design","item":"https://www.dummies.com/category/articles/general-programming-web-design-33610"},{"@type":"ListItem","position":5,"name":"How to Fix Noncompliant Code on Your Web Page"}]},{"@type":"Organization","url":"https://www.dummies.com/","logo":"https://www.dummies.com/img/logo.f7c39ad9.svg"},{"@type":"ImageObject","id":"#primaryimage","@id":"https://www.dummies.com/article/technology/programming-web-design/general-programming-web-design/how-to-fix-noncompliant-code-on-your-web-page-166201//#primaryimage","url":"","caption":"","height":0,"width":0},{"@type":"Article","id":"#article","headline":"How to Fix Noncompliant Code on Your Web Page dummies","datePublished":"2016-03-26T14:56:06+00:00","dateModified":"2016-03-26T14:56:06+00:00","author":[{"@type":"Person","name":"Sue Jenkins","url":"https://www.dummies.com/author/sue-jenkins-9719"}],"image":{"@id":"https://www.dummies.com/article/technology/programming-web-design/general-programming-web-design/how-to-fix-noncompliant-code-on-your-web-page-166201//#primaryimage"}}]}</script></head><body class="content-pre-loaded"><span id="state-object-element" style="display: none;">{"appState":{"pageLoadApiCallsStatus":true},"articleState":{"article":{"headers":{"creationTime":"2016-03-26T14:56:06+00:00","modifiedTime":"2016-03-26T14:56:06+00:00","timestamp":"2022-02-24T16:51:48+00:00"},"data":{"breadcrumbs":[{"name":"Technology","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33512"},"slug":"technology","categoryId":33512},{"name":"Programming & Web Design","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33592"},"slug":"programming-web-design","categoryId":33592},{"name":"General (Programming & Web Design)","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33610"},"slug":"general-programming-web-design","categoryId":33610}],"title":"How to Fix Noncompliant Code on Your Web Page","strippedTitle":"how to fix noncompliant code on your web page","slug":"how-to-fix-noncompliant-code-on-your-web-page","canonicalUrl":"","seo":{"metaDescription":"","noIndex":0,"noFollow":0},"content":"<p>For each web coding issue identified by a validator, you need to determine what course of action to take. Although some culprits that repeatedly crop up are easy to fix, such as missing <span class=\"code\">alt</span> text and <span class=\"code\"><noscript></span> tags, you’re bound to find coding issues that completely baffle and stump you.</p>\n<p>For instance, if you get an error message that reads <span class=\"code\">XML Parsing Error: Opening and ending tag mismatch: br line 52 and body</span>, it might be difficult to figure out what that means, let alone why it was caused and how you should fix it.</p>\n<p>As a strategy then, try to fix the issues within the code from the top down, as they’re listed in the validation results, because sometimes fixing one issue resolves another. With the XML parsing error, that issue might disappear when you correct for an omitted closing element on a <span class=\"code\"><br /></span> tag listed earlier in the error results.</p>\n<p>The best way to find out how to code better and make fewer mistakes before validation testing is to make lots of honest mistakes and figure out how to correct them on your own. Most often, you can fix noncompliant code by hand or with the help of a good HTML editor.</p>\n<p>To help you identify some of the more common coding mistakes, here several code issues along with suggestions about how to fix them.</p>\n<table>\n<tr>\n<th>Problem</th>\n<th>Solution</th>\n</tr>\n<tr>\n<td><span class=\"code\">alt</span> text attribute missing from <span\nclass=\"code\"><img></span> tag</td>\n<td>Add the alternative text attribute, either with or without a\ndescription, as in <span class=\"code\"><img\nsrc=”images/logo.gif” width=”150”\nheight=”150” alt=”Pete’s Pizza”>\n<img src=”images/flourish.gif” width=”200”\nheight=”150” alt=””></span>.</td>\n</tr>\n<tr>\n<td><span class=\"code\"><noscript></span> tags missing from\ncode</td>\n<td>Add <span class=\"code\"><noscript></span> tags below each\ninstance when JavaScript is present in in-line JavaScript or at the\nend of the content before the closing body tag. Between the <span\nclass=\"code\"><noscript></span> tags, insert HTML content\n(text, graphics, media files, and so on) that describes the\nfunction of the JavaScript and, when appropriate, how visitors can\naccess the information revealed by it, as shown here:<br />\n<span class=\"code\"><script language=”JavaScript”\nsrc=”</span><span class=\"code\">bookmark.js”\ntype=”text/javascript”></script><noscript>The\nJavaScript used on this page provides a quick link that allows\nvisitors to automatically bookmark this page. As an alternative,\nplease use your browser’s Bookmark</span> <span\nclass=\"code\">This Page feature.</noscript></span></td>\n</tr>\n<tr>\n<td>Flashing or flickering element(s) detected, such as animated\nGIFs, Java applets, and other multimedia plug-ins</td>\n<td>Adjust the speed of any animations to avoid causing the screen\nto flicker with a frequency between 2 Hz and 55 Hz. Animations that\nexceed these two measures may cause seizures in visitors with\nphotosensitive epilepsy.</td>\n</tr>\n<tr>\n<td>No <span class=\"code\">DOCTYPE</span> specified</td>\n<td>Add a valid <span class=\"code\">DOCTYPE</span> above the opening\n<span class=\"code\"><head></span> tag.</td>\n</tr>\n<tr>\n<td>No HTTP charset parameter specified</td>\n<td>This special meta tag specifies the character set used in the\nHTML code. Some HTML editors include it automatically when\ngenerating new blank web pages. If validation finds that this tag\nis missing from your HTML or XHTML code, insert the following code\nby hand: <span class=\"code\"><meta\nhttp-equiv=”Content-Type” content=”text/html;\ncharset=utf-8”></span>. For HTML5, insert <span\nclass=\"code\"><meta charset=\"utf-8\"></span>.</td>\n</tr>\n<tr>\n<td>No <span class=\"code\"><title></span> tag specified</td>\n<td>Add a unique title between <span\nclass=\"code\"><title></span> tags in the head area on each\npage.</td>\n</tr>\n<tr>\n<td>No <span class=\"code\"><meta></span> tags specified</td>\n<td>Add meta keywords and meta description tags to the head of each\npage. These can be identical on every page on the site. If desired,\nyou may also add additional meta tags as needed.</td>\n</tr>\n<tr>\n<td>No Robots tags specified</td>\n<td>Add the <span class=\"code\">Robots</span> <span\nclass=\"code\"><meta></span> tag in the head of the page to\ninstruct web spiders and robots whether to index the page and\nfollow any hyperlinks, such as <span class=\"code\"><meta\nname=”Robots” content=”All”></span>.</td>\n</tr>\n<tr>\n<td>Deprecated <span class=\"code\"><font></span> tags\ndetected</td>\n<td>Move all the presentation markup of the HTML (page, fonts,\ntables, links, and so on) to an external CSS file and remove all\n<span class=\"code\"><font></span> tags and HTML and inline\nformatting attributes.</td>\n</tr>\n<tr>\n<td>Deprecated table height attribute detected</td>\n<td>Control table cell heights, when necessary, with CSS\nstyles.</td>\n</tr>\n<tr>\n<td>Style attributes detected in the opening <span\nclass=\"code\"><body></span> tag</td>\n<td>Move <span class=\"code\">body</span> attributes, like margin\nattributes and background page color, to a BODY tag redefine style\nin an external CSS file.</td>\n</tr>\n<tr>\n<td><span class=\"code\">type</span> attribute not specified for\nJavaScript or CSS</td>\n<td>Add the <span class=\"code\">type=”text/css”</span>\nattribute for <span class=\"code\"><style></span> tags and the\n<span class=\"code\">type=”text/javascript”</span>\nattribute for <span class=\"code\"><script></span> tags: <span\nclass=\"code\"><style type=”text/css” ><script\ntype=”text/javascript”></span>.</td>\n</tr>\n<tr>\n<td>Entity name used instead of entity number</td>\n<td>Change the entity name to an entity number, such as using <span\nclass=\"code\">$#169;</span> instead of <span\nclass=\"code\">&copy;</span> to create the copyright symbol\n(c).</td>\n</tr>\n<tr>\n<td>No background color attribute was specified for a CSS style\nthat specifies text color</td>\n<td>Provide each style that contains a text <span\nclass=\"code\">color</span> attribute with an attending background\n<span class=\"code\">color</span> attribute. The background color\nshould match, or closely match, the background color upon which the\ntext will display on.</td>\n</tr>\n</table>\n<p>When you’re finished identifying and adjusting all the noncompliant code identified by the validation tools, and have fixed everything that needed fixing, move on to the retesting and acceptable failure phase of the testing process.</p>","description":"<p>For each web coding issue identified by a validator, you need to determine what course of action to take. Although some culprits that repeatedly crop up are easy to fix, such as missing <span class=\"code\">alt</span> text and <span class=\"code\"><noscript></span> tags, you’re bound to find coding issues that completely baffle and stump you.</p>\n<p>For instance, if you get an error message that reads <span class=\"code\">XML Parsing Error: Opening and ending tag mismatch: br line 52 and body</span>, it might be difficult to figure out what that means, let alone why it was caused and how you should fix it.</p>\n<p>As a strategy then, try to fix the issues within the code from the top down, as they’re listed in the validation results, because sometimes fixing one issue resolves another. With the XML parsing error, that issue might disappear when you correct for an omitted closing element on a <span class=\"code\"><br /></span> tag listed earlier in the error results.</p>\n<p>The best way to find out how to code better and make fewer mistakes before validation testing is to make lots of honest mistakes and figure out how to correct them on your own. Most often, you can fix noncompliant code by hand or with the help of a good HTML editor.</p>\n<p>To help you identify some of the more common coding mistakes, here several code issues along with suggestions about how to fix them.</p>\n<table>\n<tr>\n<th>Problem</th>\n<th>Solution</th>\n</tr>\n<tr>\n<td><span class=\"code\">alt</span> text attribute missing from <span\nclass=\"code\"><img></span> tag</td>\n<td>Add the alternative text attribute, either with or without a\ndescription, as in <span class=\"code\"><img\nsrc=”images/logo.gif” width=”150”\nheight=”150” alt=”Pete’s Pizza”>\n<img src=”images/flourish.gif” width=”200”\nheight=”150” alt=””></span>.</td>\n</tr>\n<tr>\n<td><span class=\"code\"><noscript></span> tags missing from\ncode</td>\n<td>Add <span class=\"code\"><noscript></span> tags below each\ninstance when JavaScript is present in in-line JavaScript or at the\nend of the content before the closing body tag. Between the <span\nclass=\"code\"><noscript></span> tags, insert HTML content\n(text, graphics, media files, and so on) that describes the\nfunction of the JavaScript and, when appropriate, how visitors can\naccess the information revealed by it, as shown here:<br />\n<span class=\"code\"><script language=”JavaScript”\nsrc=”</span><span class=\"code\">bookmark.js”\ntype=”text/javascript”></script><noscript>The\nJavaScript used on this page provides a quick link that allows\nvisitors to automatically bookmark this page. As an alternative,\nplease use your browser’s Bookmark</span> <span\nclass=\"code\">This Page feature.</noscript></span></td>\n</tr>\n<tr>\n<td>Flashing or flickering element(s) detected, such as animated\nGIFs, Java applets, and other multimedia plug-ins</td>\n<td>Adjust the speed of any animations to avoid causing the screen\nto flicker with a frequency between 2 Hz and 55 Hz. Animations that\nexceed these two measures may cause seizures in visitors with\nphotosensitive epilepsy.</td>\n</tr>\n<tr>\n<td>No <span class=\"code\">DOCTYPE</span> specified</td>\n<td>Add a valid <span class=\"code\">DOCTYPE</span> above the opening\n<span class=\"code\"><head></span> tag.</td>\n</tr>\n<tr>\n<td>No HTTP charset parameter specified</td>\n<td>This special meta tag specifies the character set used in the\nHTML code. Some HTML editors include it automatically when\ngenerating new blank web pages. If validation finds that this tag\nis missing from your HTML or XHTML code, insert the following code\nby hand: <span class=\"code\"><meta\nhttp-equiv=”Content-Type” content=”text/html;\ncharset=utf-8”></span>. For HTML5, insert <span\nclass=\"code\"><meta charset=\"utf-8\"></span>.</td>\n</tr>\n<tr>\n<td>No <span class=\"code\"><title></span> tag specified</td>\n<td>Add a unique title between <span\nclass=\"code\"><title></span> tags in the head area on each\npage.</td>\n</tr>\n<tr>\n<td>No <span class=\"code\"><meta></span> tags specified</td>\n<td>Add meta keywords and meta description tags to the head of each\npage. These can be identical on every page on the site. If desired,\nyou may also add additional meta tags as needed.</td>\n</tr>\n<tr>\n<td>No Robots tags specified</td>\n<td>Add the <span class=\"code\">Robots</span> <span\nclass=\"code\"><meta></span> tag in the head of the page to\ninstruct web spiders and robots whether to index the page and\nfollow any hyperlinks, such as <span class=\"code\"><meta\nname=”Robots” content=”All”></span>.</td>\n</tr>\n<tr>\n<td>Deprecated <span class=\"code\"><font></span> tags\ndetected</td>\n<td>Move all the presentation markup of the HTML (page, fonts,\ntables, links, and so on) to an external CSS file and remove all\n<span class=\"code\"><font></span> tags and HTML and inline\nformatting attributes.</td>\n</tr>\n<tr>\n<td>Deprecated table height attribute detected</td>\n<td>Control table cell heights, when necessary, with CSS\nstyles.</td>\n</tr>\n<tr>\n<td>Style attributes detected in the opening <span\nclass=\"code\"><body></span> tag</td>\n<td>Move <span class=\"code\">body</span> attributes, like margin\nattributes and background page color, to a BODY tag redefine style\nin an external CSS file.</td>\n</tr>\n<tr>\n<td><span class=\"code\">type</span> attribute not specified for\nJavaScript or CSS</td>\n<td>Add the <span class=\"code\">type=”text/css”</span>\nattribute for <span class=\"code\"><style></span> tags and the\n<span class=\"code\">type=”text/javascript”</span>\nattribute for <span class=\"code\"><script></span> tags: <span\nclass=\"code\"><style type=”text/css” ><script\ntype=”text/javascript”></span>.</td>\n</tr>\n<tr>\n<td>Entity name used instead of entity number</td>\n<td>Change the entity name to an entity number, such as using <span\nclass=\"code\">$#169;</span> instead of <span\nclass=\"code\">&copy;</span> to create the copyright symbol\n(c).</td>\n</tr>\n<tr>\n<td>No background color attribute was specified for a CSS style\nthat specifies text color</td>\n<td>Provide each style that contains a text <span\nclass=\"code\">color</span> attribute with an attending background\n<span class=\"code\">color</span> attribute. The background color\nshould match, or closely match, the background color upon which the\ntext will display on.</td>\n</tr>\n</table>\n<p>When you’re finished identifying and adjusting all the noncompliant code identified by the validation tools, and have fixed everything that needed fixing, move on to the retesting and acceptable failure phase of the testing process.</p>","blurb":"","authors":[{"authorId":9719,"name":"Sue Jenkins","slug":"sue-jenkins","description":"Sue Jenkins is a working designer as well as a design trainer and author. Her design firm, Luckychair, provides design services for web, logo, and print. Jenkins has also created a series of courses on popular Adobe design tools including Photoshop and Illustrator.","_links":{"self":"https://dummies-api.dummies.com/v2/authors/9719"}}],"primaryCategoryTaxonomy":{"categoryId":33610,"title":"General (Programming & Web Design)","slug":"general-programming-web-design","_links":{"self":"https://dummies-api.dummies.com/v2/categories/33610"}},"secondaryCategoryTaxonomy":{"categoryId":0,"title":null,"slug":null,"_links":null},"tertiaryCategoryTaxonomy":{"categoryId":0,"title":null,"slug":null,"_links":null},"trendingArticles":null,"inThisArticle":[],"relatedArticles":{"fromBook":[{"articleId":208112,"title":"Web Design All-in-One For Dummies Cheat Sheet","slug":"web-design-all-in-one-for-dummies-cheat-sheet","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/208112"}},{"articleId":204470,"title":"How to Add a DOCTYPE in Dreamweaver","slug":"how-to-add-a-doctype-in-dreamweaver","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/204470"}},{"articleId":204469,"title":"How to Remove Unwanted Formatting from Your Website","slug":"how-to-remove-unwanted-formatting-from-your-website","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/204469"}},{"articleId":204468,"title":"How to Transfer Files to Your Website with Dreamweaver","slug":"how-to-transfer-files-to-your-website-with-dreamweaver","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/204468"}},{"articleId":171074,"title":"Nine Basic CSS Categories to Use in Web Design","slug":"nine-basic-css-categories-to-use-in-web-design","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/171074"}}],"fromCategory":[{"articleId":265680,"title":"Tips for Improving Engineering Performance with DevOps","slug":"tips-for-improving-engineering-performance-with-devops","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/265680"}},{"articleId":265675,"title":"Make More of Your Cloud Tools: Automating DevOps in the Cloud","slug":"make-more-of-your-cloud-tools-automating-devops-in-the-cloud","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/265675"}},{"articleId":265672,"title":"Choosing the Best Cloud Service Provider, Features, and Tools for DevOps","slug":"choosing-the-best-cloud-service-provider-features-and-tools-for-devops","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/265672"}},{"articleId":265664,"title":"How to Form DevOps Teams in Your Organization","slug":"how-to-form-devops-teams-in-your-organization","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/265664"}},{"articleId":265656,"title":"Moving to DevOps Processes: From a Line to a Circuit","slug":"moving-to-devops-processes-from-a-line-to-a-circuit","categoryList":["technology","programming-web-design","general-programming-web-design"],"_links":{"self":"https://dummies-api.dummies.com/v2/articles/265656"}}]},"hasRelatedBookFromSearch":false,"relatedBook":{"bookId":281890,"slug":"web-design-all-in-one-for-dummies-2nd-edition","isbn":"9781118404102","categoryList":["technology","programming-web-design","general-programming-web-design"],"amazon":{"default":"https://www.amazon.com/gp/product/1118404106/ref=as_li_tl?ie=UTF8&tag=wiley01-20","ca":"https://www.amazon.ca/gp/product/1118404106/ref=as_li_tl?ie=UTF8&tag=wiley01-20","indigo_ca":"http://www.tkqlhce.com/click-9208661-13710633?url=https://www.chapters.indigo.ca/en-ca/books/product/1118404106-item.html&cjsku=978111945484","gb":"https://www.amazon.co.uk/gp/product/1118404106/ref=as_li_tl?ie=UTF8&tag=wiley01-20","de":"https://www.amazon.de/gp/product/1118404106/ref=as_li_tl?ie=UTF8&tag=wiley01-20"},"image":{"src":"https://www.dummies.com/wp-content/uploads/web-design-all-in-one-for-dummies-2nd-edition-cover-9781118404102-203x255.jpg","width":203,"height":255},"title":"Web Design All-in-One For Dummies, 2nd Edition","testBankPinActivationLink":"","bookOutOfPrint":false,"authorsInfo":"\n <p><b data-author-id=\"9719\">Sue Jenkins</b> is a working designer as well as a design trainer and author. Her design firm, Luckychair, provides design services for web, logo, and print. Sue has also created a series of training DVDs on popular Adobe design tools including Photoshop, Dreamweaver, and Illustrator.</p>","authors":[{"authorId":9719,"name":"Sue Jenkins","slug":"sue-jenkins","description":"Sue Jenkins is a working designer as well as a design trainer and author. Her design firm, Luckychair, provides design services for web, logo, and print. Jenkins has also created a series of courses on popular Adobe design tools including Photoshop and Illustrator.","_links":{"self":"https://dummies-api.dummies.com/v2/authors/9719"}}],"_links":{"self":"https://dummies-api.dummies.com/v2/books/"}},"collections":[],"articleAds":{"footerAd":"<div class=\"du-ad-region row\" id=\"article_page_adhesion_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_adhesion_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;programming-web-design&quot;,&quot;general-programming-web-design&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[&quot;9781118404102&quot;]}]\" id=\"du-slot-6217b7a46e90e\"></div></div>","rightAd":"<div class=\"du-ad-region row\" id=\"article_page_right_ad\"><div class=\"du-ad-unit col-md-12\" data-slot-id=\"article_page_right_ad\" data-refreshed=\"false\" \r\n data-target = \"[{&quot;key&quot;:&quot;cat&quot;,&quot;values&quot;:[&quot;technology&quot;,&quot;programming-web-design&quot;,&quot;general-programming-web-design&quot;]},{&quot;key&quot;:&quot;isbn&quot;,&quot;values&quot;:[&quot;9781118404102&quot;]}]\" id=\"du-slot-6217b7a46f292\"></div></div>"},"articleType":{"articleType":"Articles","articleList":null,"content":null,"videoInfo":{"videoId":null,"name":null,"accountId":null,"playerId":null,"thumbnailUrl":null,"description":null,"uploadDate":null}},"sponsorship":{"sponsorshipPage":false,"backgroundImage":{"src":null,"width":0,"height":0},"brandingLine":"","brandingLink":"","brandingLogo":{"src":null,"width":0,"height":0}},"primaryLearningPath":"Advance","lifeExpectancy":null,"lifeExpectancySetFrom":null,"dummiesForKids":"no","sponsoredContent":"no","adInfo":"","adPairKey":[]},"status":"publish","visibility":"public","articleId":166201},"articleLoadedStatus":"success"},"listState":{"list":{},"objectTitle":"","status":"initial","pageType":null,"objectId":null,"page":1,"sortField":"time","sortOrder":1,"categoriesIds":[],"articleTypes":[],"filterData":{},"filterDataLoadedStatus":"initial","pageSize":10},"adsState":{"pageScripts":{"headers":{"timestamp":"2022-05-16T12:59:10+00:00"},"adsId":0,"data":{"scripts":[{"pages":["all"],"location":"header","script":"<!--Optimizely Script-->\r\n<script src=\"https://cdn.optimizely.com/js/10563184655.js\"></script>","enabled":false},{"pages":["all"],"location":"header","script":"<!-- comScore Tag -->\r\n<script>var _comscore = _comscore || [];_comscore.push({ c1: \"2\", c2: \"15097263\" });(function() {var s = document.createElement(\"script\"), el = document.getElementsByTagName(\"script\")[0]; s.async = true;s.src = (document.location.protocol == \"https:\" ? \"https://sb\" : \"http://b\") + \".scorecardresearch.com/beacon.js\";el.parentNode.insertBefore(s, el);})();</script><noscript><img src=\"https://sb.scorecardresearch.com/p?c1=2&c2=15097263&cv=2.0&cj=1\" /></noscript>\r\n<!-- / comScore Tag -->","enabled":true},{"pages":["all"],"location":"footer","script":"<!--BEGIN QUALTRICS WEBSITE FEEDBACK SNIPPET-->\r\n<script type='text/javascript'>\r\n(function(){var g=function(e,h,f,g){\r\nthis.get=function(a){for(var a=a+\"=\",c=document.cookie.split(\";\"),b=0,e=c.length;b<e;b++){for(var d=c[b];\" \"==d.charAt(0);)d=d.substring(1,d.length);if(0==d.indexOf(a))return d.substring(a.length,d.length)}return null};\r\nthis.set=function(a,c){var b=\"\",b=new Date;b.setTime(b.getTime()+6048E5);b=\"; expires=\"+b.toGMTString();document.cookie=a+\"=\"+c+b+\"; path=/; \"};\r\nthis.check=function(){var a=this.get(f);if(a)a=a.split(\":\");else if(100!=e)\"v\"==h&&(e=Math.random()>=e/100?0:100),a=[h,e,0],this.set(f,a.join(\":\"));else return!0;var c=a[1];if(100==c)return!0;switch(a[0]){case \"v\":return!1;case \"r\":return c=a[2]%Math.floor(100/c),a[2]++,this.set(f,a.join(\":\")),!c}return!0};\r\nthis.go=function(){if(this.check()){var a=document.createElement(\"script\");a.type=\"text/javascript\";a.src=g;document.body&&document.body.appendChild(a)}};\r\nthis.start=function(){var t=this;\"complete\"!==document.readyState?window.addEventListener?window.addEventListener(\"load\",function(){t.go()},!1):window.attachEvent&&window.attachEvent(\"onload\",function(){t.go()}):t.go()};};\r\ntry{(new g(100,\"r\",\"QSI_S_ZN_5o5yqpvMVjgDOuN\",\"https://zn5o5yqpvmvjgdoun-wiley.siteintercept.qualtrics.com/SIE/?Q_ZID=ZN_5o5yqpvMVjgDOuN\")).start()}catch(i){}})();\r\n</script><div id='ZN_5o5yqpvMVjgDOuN'><!--DO NOT REMOVE-CONTENTS PLACED HERE--></div>\r\n<!--END WEBSITE FEEDBACK SNIPPET-->","enabled":false},{"pages":["all"],"location":"header","script":"<!-- Hotjar Tracking Code for http://www.dummies.com -->\r\n<script>\r\n (function(h,o,t,j,a,r){\r\n h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};\r\n h._hjSettings={hjid:257151,hjsv:6};\r\n a=o.getElementsByTagName('head')[0];\r\n r=o.createElement('script');r.async=1;\r\n r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;\r\n a.appendChild(r);\r\n })(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');\r\n</script>","enabled":false},{"pages":["article"],"location":"header","script":"<!-- //Connect Container: dummies --> <script src=\"//get.s-onetag.com/bffe21a1-6bb8-4928-9449-7beadb468dae/tag.min.js\" async defer></script>","enabled":true},{"pages":["homepage"],"location":"header","script":"<meta name=\"facebook-domain-verification\" content=\"irk8y0irxf718trg3uwwuexg6xpva0\" />","enabled":true},{"pages":["homepage","article","category","search"],"location":"footer","script":"<!-- Facebook Pixel Code -->\r\n<noscript>\r\n<img height=\"1\" width=\"1\" src=\"https://www.facebook.com/tr?id=256338321977984&ev=PageView&noscript=1\"/>\r\n</noscript>\r\n<!-- End Facebook Pixel Code -->","enabled":true}]}},"pageScriptsLoadedStatus":"success"},"searchState":{"searchList":[],"searchStatus":"initial","relatedArticlesList":[],"relatedArticlesStatus":"initial"},"routeState":{"name":"Article3","path":"/article/technology/programming-web-design/general-programming-web-design/how-to-fix-noncompliant-code-on-your-web-page-166201/","hash":"","query":{},"params":{"category1":"technology","category2":"programming-web-design","category3":"general-programming-web-design","article":"how-to-fix-noncompliant-code-on-your-web-page-166201"},"fullPath":"/article/technology/programming-web-design/general-programming-web-design/how-to-fix-noncompliant-code-on-your-web-page-166201/","meta":{"routeType":"article","breadcrumbInfo":{"suffix":"Articles","baseRoute":"/category/articles"},"prerenderWithAsyncData":true},"from":{"name":null,"path":"/","hash":"","query":{},"params":{},"fullPath":"/","meta":{}}},"dropsState":{"submitEmailResponse":false,"status":"initial"},"sfmcState":{"newsletterSignupStatus":"initial"}}</span><div data-v-b8014388="" id="app"><header data-v-62944308="" data-v-b8014388="" class="top-header"><div data-v-62944308="" class="container"><div data-v-62944308="" class="row no-gutters"><div data-v-62944308="" data-testid="topHeaderItems" class="header-items col"><a data-v-62944308="" href="/" class="logo router-link-active" rel="Home" aria-label="Dummies" data-testid="topHeaderLogo"><img data-v-62944308="" loading="lazy" src="/img/logo.f7c39ad9.svg" alt="Logo"></a><div data-v-62944308="" class="d-none d-lg-flex navigation-block"><div data-v-0dfb8b0e="" data-v-62944308=""><nav data-v-0dfb8b0e="" class="navbar header-navigation navbar-light navbar-expand"><ul data-v-0dfb8b0e="" data-testid="headerNavBar" class="navbar-nav"><li data-v-0dfb8b0e="" data-testid="headerArticlesMenuButton" class=""> Articles <img data-v-0dfb8b0e="" src="/img/chevron-down-black.2be3dc82.svg" alt="Open Article Categories" width="13" height="8" class="angle-icon"></li><li data-v-0dfb8b0e="" data-testid="headerBooksMenuButton" class=""> Books <img data-v-0dfb8b0e="" src="/img/chevron-down-black.2be3dc82.svg" alt="Open Book Categories" width="13" height="8" class="angle-icon"></li><li data-v-0dfb8b0e="" data-testid="headerCollectionsMenuButton" class=""> Collections <img data-v-0dfb8b0e="" src="/img/chevron-down-black.2be3dc82.svg" alt="Open Collections list" width="13" height="8" class="angle-icon"></li><li data-v-0dfb8b0e="" data-testid="headerCustomBooksMenuButton"><a data-v-0dfb8b0e="" rel="noopener noreferrer" href="https://www.dummies.com/custom-solutions" target="_blank" data-testid="linkToPartnerwithDummies"> Custom Solutions </a></li></ul></nav><!----></div></div><div data-v-78518758="" data-v-62944308="" role="group" class="input-group search-form search-elem"><!----><input data-v-78518758="" type="text" placeholder="Search for articles and books" autocomplete="off" class="search-input form-control" data-testid="searchInput" id="__BVID__12"><div data-v-78518758="" class="input-group-append"><button data-v-78518758="" data-testid="clearButton" aria-label="Clear search term" type="button" class="btn clear-button btn-light" style="display: none;"></button><button data-v-78518758="" data-testid="searchButton" aria-label="Search Button" type="button" disabled="disabled" class="btn search-button btn-light disabled"><!----></button></div><!----><!----></div><section data-v-5e56a21e="" data-v-62944308="" class="header-navigation-tablet"><button data-v-5e56a21e="" data-testid="headerNavigationOpenButton" aria-label="Open menu" type="button" class="btn toggle-button open-button btn-light"></button><!----></section></div></div></div></header><div data-v-b8014388="" class="b-overlay-wrap position-relative"><section data-v-b8014388="" class="app-content Article3"><article data-v-2506728f="" data-v-b8014388="" id="printArticle" class="article-page"><div data-v-2506728f="" id="div-1"></div><!----><div data-v-2506728f="" class="custom-container container" style=""><section data-v-2506728f="" id="tab0"><div data-v-08e7d34e="" data-v-2506728f="" class="row article-intoduction article-introduction"><div data-v-08e7d34e="" class="col-md-12"><ul data-v-2867f637="" data-v-08e7d34e="" class="breadcrumbs"><li data-v-2867f637="" data-testid="homeItem" class=""><a data-v-2867f637="" href="/" class="router-link-active" data-testid="homeLink"> Home </a></li><li data-v-2867f637="" data-testid="breadcrumbsItem" class=""><a data-v-2867f637="" href="/category/articles/technology-33512/" class="" data-testid="breadcrumbsLink"> Technology Articles </a></li><li data-v-2867f637="" data-testid="breadcrumbsItem" class=""><a data-v-2867f637="" href="/category/articles/programming-web-design-33592/" class="" data-testid="breadcrumbsLink"> Programming & Web Design Articles </a></li><li data-v-2867f637="" data-testid="breadcrumbsItem" class="prev-level"><a data-v-2867f637="" href="/category/articles/general-programming-web-design-33610/" class="" data-testid="breadcrumbsLink"> General (Programming & Web Design) Articles </a></li><!----></ul><h1 data-v-08e7d34e="" data-testid="intruductionTitle" class="h1">How to Fix Noncompliant Code on Your Web Page</h1><div data-v-4db6b93c="" data-v-08e7d34e="" class="author"><div data-v-4db6b93c="" data-testid="authorsField" class="author-info"><strong data-v-4db6b93c="">By: </strong><span data-v-4db6b93c="" class="author-info-list"><a data-v-4db6b93c="" href="/author/sue-jenkins-9719/" class="" data-testid="authorLink"> Sue Jenkins </a><span data-v-4db6b93c="" class="list-sep"> and </span></span></div><div data-v-4db6b93c="" data-testid="modifiedTime" class="author-info"><strong data-v-4db6b93c="">Updated:</strong> 03-26-2016 </div><div data-v-4db6b93c="" data-testid="fromBook" class="author-info from-book"><strong data-v-4db6b93c="">From The Book: </strong><a data-v-4db6b93c="" href="/book/technology/programming-web-design/general-programming-web-design/web-design-all-in-one-for-dummies-2nd-edition-281890/" class="link-underline" data-testid="bookLink" aria-label="From the book link" analytics-id="articleFromTheBook"> Web Design All-in-One For Dummies, 2nd Edition </a></div></div><div data-v-08e7d34e="" data-testid="socialLinks" class="socials-block"><div data-v-53393351="" data-v-08e7d34e="" class="share-links"><ul data-v-53393351="" data-testid="shareLinkList" class="share-links"><li data-v-53393351=""><a data-v-53393351="" href="javascript:void(0)" class="share-item facebook share-network-facebook" data-testid="shareFaceBook" aria-label="Share on Facebook"></a></li><li data-v-53393351=""><a data-v-53393351="" href="javascript:void(0)" class="share-item twitter share-network-twitter" data-testid="shareTwitter" aria-label="Share on Twitter"></a></li><li data-v-53393351=""><a data-v-53393351="" href="javascript:void(0)" class="share-item linkedin share-network-linkedin" data-testid="shareLinkedIn" aria-label="Share on LinkedIn"></a></li><li data-v-53393351="" class="mail-link"><a data-v-53393351="" href="javascript:void(0)" class="share-item mail share-network-email" data-testid="shareEmail" aria-label="Share with e-mail"></a></li><li data-v-53393351="" class="print-link h-mobile d-desktop"><button data-v-53393351="" data-testid="sharePrint" aria-label="Print" class="share-item print"></button></li></ul></div></div></div></div></section><div data-v-2506728f="" class="row article-body"><div data-v-2506728f="" class="col-md-12 col-lg-9"><div data-v-2506728f="" class="page-content d-flex"><div data-v-70101ba0="" data-v-2506728f="" data-testid="bookInfoWrapper" class="book-purchase-cta book-info-container"><h5 data-v-70101ba0="" data-testid="bookInfoTitle"> Web Design All-in-One For Dummies, 2nd Edition </h5><div data-v-70101ba0="" class="book-author-image"><img data-v-70101ba0="" src="https://www.dummies.com/wp-content/uploads/web-design-all-in-one-for-dummies-2nd-edition-cover-9781118404102-203x255.jpg" alt="Book image" class="" data-testid="bookInfoImage"></div><a data-v-e513ada8="" data-v-70101ba0="" href="/book/technology/programming-web-design/general-programming-web-design/web-design-all-in-one-for-dummies-2nd-edition-281890/" class="mb-3 custom-button custom-button--secondary" data-testid="bookInfoExploreButton"> Explore Book </a><a data-v-e513ada8="" data-v-70101ba0="" target="_blank" rel="noopener noreferrer" href="https://www.amazon.com/gp/product/1118404106/ref=as_li_tl?ie=UTF8&tag=wiley01-20" class="amazon-btn custom-button custom-button--primary" data-testid="bookInfoBuyButton">Buy On Amazon</a></div><div data-v-2506728f="" class="middle-content"><div data-v-2506728f="" id="inner-middle-content" class="inner-middle-content"><div data-v-d27f2bfe="" data-v-2506728f="" id="article-content-wrapper"><div data-v-d27f2bfe="" class="drops-email-capture secondary"><div data-testid="dropsEmailCaptureModal" id="drops-ec-modal___BV_modal_outer_" style="position: absolute; z-index: 1040;"><div id="drops-ec-modal" role="dialog" aria-hidden="true" aria-describedby="drops-ec-modal___BV_modal_body_" class="modal fade drops-email-capture-modal" style="display: none;"><div class="modal-dialog modal-md modal-dialog-centered"><!----><div id="drops-ec-modal___BV_modal_content_" tabindex="-1" class="modal-content"><header id="drops-ec-modal___BV_modal_header_" class="modal-header"><h5 id="drops-ec-modal___BV_modal_title_" class="modal-title"></h5><button type="button" aria-label="Close" class="close"><div class="close-btn"></div></button></header><div id="drops-ec-modal___BV_modal_body_" class="modal-body"><form><div class="title"><h2> Sign up for the <strong> Dummies </strong><div class="dummy"></div><strong> Beta Program </strong><br> to try Dummies' newest way to learn. </h2></div><div class="checkbox-wrapper"><label data-v-41821f21="" for="policy-agreement" class="checkbox-wrapper policy-agreement secondary"><input data-v-41821f21="" id="policy-agreement" type="checkbox" class="input"><span data-v-41821f21=""> By checking this box, you agree to the <a data-v-41821f21="" rel="noopener noreferrer" target="_blank" href="https://www.wiley.com/en-br/terms-of-use">Terms of Use</a> and <a data-v-41821f21="" rel="noopener noreferrer" target="_blank" href="https://www.wiley.com/privacy">Privacy Policy</a> & to receive electronic communications from Dummies.com, which may include marketing promotions, news and updates. </span></label><!----></div><div role="group" class="input-group email-input-group"><!----><input type="text" placeholder="Your e-mail address" class="email-input form-control" id="__BVID__44"><!----><div class="input-group-append"><button data-v-e513ada8="" type="button" aria-label="Sign Up" class="sign-up-btn custom-button custom-button--primary"><span data-v-e513ada8="">Sign Up</span></button></div><!----></div></form><!----></div><footer id="drops-ec-modal___BV_modal_footer_" class="modal-footer"><button type="button" class="btn btn-secondary">Cancel</button><button type="button" class="btn btn-primary">OK</button></footer></div><!----></div></div><!----></div></div><div data-v-d27f2bfe="" class="row drops-callout-row"><div data-v-d27f2bfe="" data-testid="dropsCalloutsWrapper" class="drops-callout-col col"></div></div><article data-v-d27f2bfe="" data-testid="articleContent" class="article-content"><p>For each web coding issue identified by a validator, you need to determine what course of action to take. Although some culprits that repeatedly crop up are easy to fix, such as missing <span class="code">alt</span> text and <span class="code"><noscript></span> tags, you’re bound to find coding issues that completely baffle and stump you.</p> <p>For instance, if you get an error message that reads <span class="code">XML Parsing Error: Opening and ending tag mismatch: br line 52 and body</span>, it might be difficult to figure out what that means, let alone why it was caused and how you should fix it.</p> <p>As a strategy then, try to fix the issues within the code from the top down, as they’re listed in the validation results, because sometimes fixing one issue resolves another. With the XML parsing error, that issue might disappear when you correct for an omitted closing element on a <span class="code"><br /></span> tag listed earlier in the error results.</p> <p>The best way to find out how to code better and make fewer mistakes before validation testing is to make lots of honest mistakes and figure out how to correct them on your own. Most often, you can fix noncompliant code by hand or with the help of a good HTML editor.</p> <p>To help you identify some of the more common coding mistakes, here several code issues along with suggestions about how to fix them.</p> <table> <tr> <th>Problem</th> <th>Solution</th> </tr> <tr> <td><span class="code">alt</span> text attribute missing from <span class="code"><img loading="lazy"></span> tag</td> <td>Add the alternative text attribute, either with or without a description, as in <span class="code"><img src=”images/logo.gif” width=”150” height=”150” alt=”Pete’s Pizza”> <img src=”images/flourish.gif” width=”200” height=”150” alt=””></span>.</td> </tr> <tr> <td><span class="code"><noscript></span> tags missing from code</td> <td>Add <span class="code"><noscript></span> tags below each instance when JavaScript is present in in-line JavaScript or at the end of the content before the closing body tag. Between the <span class="code"><noscript></span> tags, insert HTML content (text, graphics, media files, and so on) that describes the function of the JavaScript and, when appropriate, how visitors can access the information revealed by it, as shown here:<br /> <span class="code"><script language=”JavaScript” src=”</span><span class="code">bookmark.js” type=”text/javascript”></script><noscript>The JavaScript used on this page provides a quick link that allows visitors to automatically bookmark this page. As an alternative, please use your browser’s Bookmark</span> <span class="code">This Page feature.</noscript></span> Flashing or flickering element(s) detected, such as animated GIFs, Java applets, and other multimedia plug-ins Adjust the speed of any animations to avoid causing the screen to flicker with a frequency between 2 Hz and 55 Hz. Animations that exceed these two measures may cause seizures in visitors with photosensitive epilepsy. No <span class="code">DOCTYPE</span> specified Add a valid <span class="code">DOCTYPE</span> above the opening <span class="code"></span> tag. No HTTP charset parameter specified This special meta tag specifies the character set used in the HTML code. Some HTML editors include it automatically when generating new blank web pages. If validation finds that this tag is missing from your HTML or XHTML code, insert the following code by hand: <span class="code"><meta http-equiv="”Content-Type”" content="”text/html;" charset="utf-8”"></span>. For HTML5, insert <span class="code"><meta charset="utf-8"></span>. No <span class="code"><title></span> tag specified</td> <td>Add a unique title between <span class="code"><title></span> tags in the head area on each page.</td> </tr> <tr> <td>No <span class="code"><meta></span> tags specified</td> <td>Add meta keywords and meta description tags to the head of each page. These can be identical on every page on the site. If desired, you may also add additional meta tags as needed.</td> </tr> <tr> <td>No Robots tags specified</td> <td>Add the <span class="code">Robots</span> <span class="code"><meta></span> tag in the head of the page to instruct web spiders and robots whether to index the page and follow any hyperlinks, such as <span class="code"><meta name=”Robots” content=”All”></span>.</td> </tr> <tr> <td>Deprecated <span class="code"><font></span> tags detected</td> <td>Move all the presentation markup of the HTML (page, fonts, tables, links, and so on) to an external CSS file and remove all <span class="code"><font></span> tags and HTML and inline formatting attributes.</td> </tr> <tr> <td>Deprecated table height attribute detected</td> <td>Control table cell heights, when necessary, with CSS styles.</td> </tr> <tr> <td>Style attributes detected in the opening <span class="code"><body></span> tag</td> <td>Move <span class="code">body</span> attributes, like margin attributes and background page color, to a BODY tag redefine style in an external CSS file.</td> </tr> <tr> <td><span class="code">type</span> attribute not specified for JavaScript or CSS</td> <td>Add the <span class="code">type=”text/css”</span> attribute for <span class="code"><style></span> tags and the <span class="code">type=”text/javascript”</span> attribute for <span class="code"><script></span> tags: <span class="code"><style type=”text/css” ><script type=”text/javascript”></span>.</td> </tr> <tr> <td>Entity name used instead of entity number</td> <td>Change the entity name to an entity number, such as using <span class="code">$#169;</span> instead of <span class="code">©</span> to create the copyright symbol (c).</td> </tr> <tr> <td>No background color attribute was specified for a CSS style that specifies text color</td> <td>Provide each style that contains a text <span class="code">color</span> attribute with an attending background <span class="code">color</span> attribute. The background color should match, or closely match, the background color upon which the text will display on.</td> </tr> </table> <p>When you’re finished identifying and adjusting all the noncompliant code identified by the validation tools, and have fixed everything that needed fixing, move on to the retesting and acceptable failure phase of the testing process.</p>

About This Article

This article is from the book:

About the book author:

Sue Jenkins is a working designer as well as a design trainer and author. Her design firm, Luckychair, provides design services for web, logo, and print. Sue has also created a series of training DVDs on popular Adobe design tools including Photoshop, Dreamweaver, and Illustrator.

This article can be found in the category: