{"id":74,"date":"2005-05-06T16:05:46","date_gmt":"2005-05-06T16:05:46","guid":{"rendered":"http:\/\/lachy.id.au\/log\/2005\/05\/validation-quiz"},"modified":"2006-04-30T23:46:07","modified_gmt":"2006-04-30T23:46:07","slug":"validation-quiz","status":"publish","type":"post","link":"https:\/\/lachy.id.au\/log\/2005\/05\/validation-quiz","title":{"rendered":"Validation Quiz"},"content":{"rendered":"<p>Let\u2019s say you\u2019ve been writing HTML and XHTML for years. Being a standards\r\n\tactivist, you always write well formed, valid markup. You meticulously validate\r\n\tevery document you write. Not only that, but you\u2019ve installed the web developer\r\n\ttoolbar in Firefox or Mozilla and, as a hobby, you run the validator on every\r\n\tsite you visit. With years of experience under your belt, you think you can\r\n\thandle any error the validator throws at you, and you\u2019re confident you can fix\r\n\twhatever it is in under a minute.<\/p>\r\n<p>If that description fits you, then I hereby challenge you to find the one\r\n\tand only real validation error within the following sample HTML or XHTML document\r\n\t(I\u2019m not telling you which, you figure it out). Do you think <a href=\"http:\/\/validator.w3.org\/\">the\r\n\tvalidator<\/a> will\r\n\thelp? <a href=\"http:\/\/validator.w3.org\/fragment-upload\">Go ahead and test it<\/a>! I\u2019ve exploited some known bugs in the validator\r\n\tto ensure you can\u2019t cheat quite so easily. The validator will, in its current\r\n\tstate, issue 80 errors; none of which are real!<\/p>\r\n<p>There is one, <strong>and only one<\/strong>, true validation error within\r\n\tthis document. The first person to comment with the correct answer and explanation will be\r\n\tfeatured in a follow up post to them give some recognition for their hard\r\n\twork. Feel free to discuss and ask questions here in the comments (or\r\n\twherever else you like). This is designed to be a fun exercise for you to\r\n\trealise just how much you really don\u2019t know about HTML and\/or XHTML.<\/p>\r\n<p>Do you think you\u2019re ready to take the quiz? Do you think this will be a walk\r\n\tin the park, and you\u2019ll be the first across the line with the right answer?\r\n\tOk, here it is, and remember, have fun!<\/p>\r\n<p>Assume the HTTP headers contain: <code>Content-Type: text\/html;charset=UTF-8<\/code><\/p>\r\n<pre><code>&lt;?xml version=&quot;1.0&quot; comment=&quot;Find the Error!&quot; ?&gt;\r\n&lt;!-- -- --&gt;\r\n&lt;!DOCTYPE html PUBLIC &quot;-\/\/W3C\/\/DTD XHTML 1.0 Strict\/\/EN&quot;\r\n&quot;http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-strict.dtd&quot;&gt;\r\n&lt;!-- -- --&gt;\r\n&lt;!doctype html public &quot;-\/\/W3C\/\/DTD HTML 4.01\/\/EN&quot; [\r\n&lt;!ENTITY smile   CDATA &quot;?&quot; -- U+263A WHITE SMILING FACE --&gt;\r\n]&gt;\r\n&lt;html lang=&quot;en&quot;&gt;\r\n&lt;title\/validation quiz\/\r\n&lt;\/head&gt;\r\n&lt;p&gt;In this document, there &amp;exist;s a single validation error.  It makes\r\nuse of some &lt;strong&lt;em\/very\/&lt;\/strong&gt; uncommon &amp; unsupported markup techiques\r\ndesigned to fool the faint hearted.\r\n&lt;&gt;This exploits some known bugs in &lt;a href=http:\/\/validator.w3.org\/\r\nto both help prevent cheaters and confuse even the most experienced\r\nauthors.&lt;\/&gt;\r\n&lt;form method=&quot;get&quot; action=&quot;http:\/\/validator.w3.org\/check&quot;\r\n&lt;table\r\n&lt;tr\r\n&lt;td&lt;input text checked id=uri name=uri size=40\/&gt;\r\n&lt;&gt;&lt;label for=uri&gt;Is this test too hard?&lt;\/label&gt;&lt;\/&gt;\r\n&lt;&gt;&lt;td&lt;button button&gt;Don't Cheat!&lt;\/&gt;\r\n&lt;\/tbody\r\n&gt;&lt;\/table&gt;\r\n&lt;ul\/\r\n&lt;li&gt;&lt;![CDATA[\r\n&lt;li Oops&lt;!-- ?]]&gt; --&gt;\r\n&lt;li&gt;There are &lt; 2 validation errors in this document&lt;\/li&gt;\r\n&lt;?hello comment=&quot;What's this doing here?&quot;?&gt;\r\n&lt;!--- Found the error yet? ----&gt;\r\n&lt;blink&gt;I'll bet this is &amp;#147;annoying&amp;#148;!&lt;\/blink&gt;\r\n&lt;p align=&quot;right&quot;&gt;Remeber, it's a Strict DOCTYPE!\r\n&lt;!-- ------ Don't give up now! ----- &gt;\r\n&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text\/html;charset=UTF-8&quot;&gt;\r\n&lt;p&gt;Is the error here --&gt;&lt;li&gt;?\/\r\n&lt;p\/&gt;The question is: Is this&lt;br&gt;HTML or&lt;br\/&gt;XHTML\r\nserved as text\/html? &amp;smile&lt;\/&gt;&lt;\/&gt;&lt;\/&gt;<\/code><\/pre>","protected":false},"excerpt":{"rendered":"Find out how experienced you really aren&#8217;t when it comes to validation!","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[2,7],"tags":[],"_links":{"self":[{"href":"https:\/\/lachy.id.au\/log\/wp-json\/wp\/v2\/posts\/74"}],"collection":[{"href":"https:\/\/lachy.id.au\/log\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lachy.id.au\/log\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lachy.id.au\/log\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lachy.id.au\/log\/wp-json\/wp\/v2\/comments?post=74"}],"version-history":[{"count":0,"href":"https:\/\/lachy.id.au\/log\/wp-json\/wp\/v2\/posts\/74\/revisions"}],"wp:attachment":[{"href":"https:\/\/lachy.id.au\/log\/wp-json\/wp\/v2\/media?parent=74"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lachy.id.au\/log\/wp-json\/wp\/v2\/categories?post=74"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lachy.id.au\/log\/wp-json\/wp\/v2\/tags?post=74"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}