<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Third Error &#187; Design</title>
	<atom:link href="http://www.thirderror.com/category/design/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thirderror.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Mon, 27 Jul 2009 04:08:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Deciphering W3 HTML Validation Errors</title>
		<link>http://www.thirderror.com/deciphering-w3-html-validation-errors/</link>
		<comments>http://www.thirderror.com/deciphering-w3-html-validation-errors/#comments</comments>
		<pubDate>Mon, 04 Aug 2008 16:45:17 +0000</pubDate>
		<dc:creator>Jason</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://thirderror.com/?p=331</guid>
		<description><![CDATA[
The W3, in its best effort to maintain standards for web documents, has created a nifty validation service for our webpages. Unfortunately, a large proportion of the error messages provided are cryptic and difficult to understand. In this article, we&#8217;ll be delving into some of the common error messages, and how to fix them. If [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://thirderror.com/wp-content/uploads/2008/08/example-error1.png"><img style="border: 0pt none;" title="HTML Validation Error" src="http://thirderror.com/wp-content/uploads/2008/08/example-error-thumb1.png" border="0" alt="HTML Validation Error" width="453" height="79" /></a></p>
<p>The W3, in its best effort to maintain standards for web documents, has created a nifty validation service for our webpages. Unfortunately, a large proportion of the error messages provided are cryptic and difficult to understand. In this article, we&#8217;ll be delving into some of the common error messages, and how to fix them. If I&#8217;ve forgot any error messages, feel free to comment.<span id="more-331"></span></p>
<h1>No <code>DOCTYPE</code> found! Attempting validation with HTML 4.01 Transitional.</h1>
<ul>
<li><strong>Problem</strong>: You have omitted the DOCTYPE element at the beginning of your document.</li>
<li><strong>Solution</strong>: <a href="http://w3schools.com/xhtml/xhtml_dtd.asp">Include a doctype</a>.</li>
<li><strong>Notes</strong>: You can force a doctype in the validation settings, and find the one that gives you the least errors.</li>
</ul>
<h1>Missing xmlns attribute for element html. The value should be: http://www.w3.org/1999/xhtml</h1>
<ul>
<li><strong>Problem</strong>: You forgot the xmlns attribute for the &lt;html&gt; tag</li>
<li><strong>Solution</strong>: See the error description, the validator provides a sample &lt;html&gt; tag</li>
</ul>
<h1>Element &#8230; undefined</h1>
<ul>
<li><strong>Problem</strong>: The element (tag) you have used is not recognized by the doctype. May be caused by bad capitalization in XHTML, browser-specific elements (such as &lt;marquee&gt;), or is unavailable in the current doctype.</li>
<li><strong>Solution</strong>:
<ul>
<li>XHTML requires elements to be in all lowercase</li>
<li>Replace browser-specific (proprietary) with standardized elements</li>
<li>Change the doctype (XHTML Strict to XHTML Frameset)</li>
</ul>
</li>
</ul>
<h1>NET-enabling start-tag requires SHORTTAG YES</h1>
<ul>
<li><strong>Problem</strong>: Usually caused when you have a self close element (such as &lt;br /&gt;) but used the wrong doctype (HTML4) for validation.</li>
<li><strong>Solution</strong>: Change your doctype to an XHTML one (recommended) or close the element like this (&lt;br&gt;&lt;/br&gt;)</li>
</ul>
<h1>Character &#8230; is not allowed in the value of attribute &#8230;</h1>
<ul>
<li><strong>Problem:</strong> You have included an invalid character in an attribute (e.g. &#8216;&gt;&#8217; in &#8216;id&#8217;). Usually caused by missing quotation marks (&lt;div id=&#8221;blah&gt;)</li>
<li><strong>Solution</strong>: Remove the character if error was caused by intentional naming, or double check for missing quotes.</li>
</ul>
<h1>Value of attribute &#8230; must be a single token</h1>
<ul>
<li><strong>Problem</strong>: You have a space in an attribute when it is not allowed (e.g. id=&#8221;blah two&#8221;). May also be caused by missing quotation marks, sometimes earlier in the document.</li>
<li><strong>Solution</strong>: Condense the attribute value into a single word (token).</li>
</ul>
<h1>Cannot generate system identifier for&#8230;</h1>
<ul>
<li><strong>Problem</strong>: Shown in our picture above, this error commonly shows up when you&#8217;ve added an ampersand (&amp;) within the document. In this particular example, it&#8217;s part of a URL in a JavaScript tag.</li>
<li><strong>Solution</strong>: Replace the ampersand (&amp;) with <strong>&amp;amp;</strong></li>
<li><strong>Notes</strong>: This error will also cause the following warnings/errors:
<ul>
<li>general entity [...] not defined and no default entity.</li>
<li>reference not terminated by REFC delimiter.</li>
<li>reference to external entity in attribute value.</li>
<li>reference to entity [...] for which no system identifier could be generated</li>
<li>XML Parsing Error: EntityRef: expecting &#8216;;&#8217;.</li>
</ul>
</li>
</ul>
<h1>Required attribute &#8220;ALT&#8221;/&#8221;TYPE&#8221; not specified</h1>
<ul>
<li><strong>Problem</strong>: You neglected to add the attribute <strong>alt</strong> to an image or you neglected to add the attribute <strong>type</strong> to a <strong>style</strong> or <strong>script </strong>element.</li>
<li><strong>Solution:</strong> Add the alt attribute to an image: <strong>&lt;img src=&#8221;IMAGE-URL&#8221; alt=&#8221;ALTERNATE TEXT&#8221;</strong> /&gt; or add the type attribute to a <strong>script/style</strong> element: <strong>&lt;style type=&#8221;text/css&#8221; src=&#8221;STYLE SHEET URL&#8221; rel=&#8221;stylesheet&#8221; /&gt;</strong> and <strong>&lt;script type=&#8221;text/javascript&#8221;&gt;&lt;/script&gt;</strong></li>
</ul>
<h1>There is no attribute&#8230;</h1>
<ul>
<li><strong>Problem</strong>: You&#8217;ve used an attribute that doesn&#8217;t exist in the standards (e.g. marginheight for &lt;body&gt;). You may also have bad capitalization.</li>
<li><strong>Solution:</strong> Remove the attribute, find an alternative using CSS. Make sure attribute is not capitalized in XHTML documents.</li>
</ul>
<h1>End tag for element &#8230; which is not open</h1>
<ul>
<li><strong>Problem</strong>: You have an extra end tag (e.g. &lt;a href=&#8221;link&#8221;&gt;&lt;/a&gt;<strong>&lt;/a&gt;</strong>)</li>
<li><strong>Solution</strong>: Remove the extra end tag.</li>
</ul>
<h1>End tag for &#8230; omitted, but OMITTAG NO was specified</h1>
<ul>
<li><strong>Problem</strong>: You forgot to add an end tag to an element or you forgot to self-close the element (&lt;img /&gt;)</li>
<li><strong>Solution</strong>: Add the end tag, or self close it.</li>
</ul>
<h1>An attribute specification must start with a name or name token</h1>
<ul>
<li><strong>Problem</strong>: The validator does not recognize the attribute you used.</li>
<li><strong>Solution</strong>: Remove the attribute, or change the doctype to one that supports the attribute (target).</li>
</ul>
<h1>Character &#8230; is the first character of a delimiter but occurred as data</h1>
<ul>
<li><strong>Problem</strong>: The validator expected a tag or escaped character.</li>
<li><strong>Solution</strong>: If it&#8217;s an &lt;. escape it with <strong>&amp;lt;</strong> and if it&#8217;s an &amp;, escape it with <strong>&amp;amp;</strong>
<ul>
<li>The validator also suggests that you may have forgotten to close a tag</li>
</ul>
</li>
</ul>
<h1>XML Parsing Error: Opening and ending tag mismatch: &#8230; and &#8230;</h1>
<ul>
<li><strong>Problem</strong>: Tag A is opened after Tag B, but Tag B is closed before Tag A. Will usually cause other errors.</li>
<li><strong>Solution</strong>: Check that all tags are closed.</li>
<li><strong>Notes:</strong> May cause the following errors:
<ul>
<li>XML Parsing Error: Premature end of data in tag &#8230;</li>
<li>XML Parsing Error: Opening and ending tag mismatch: &#8230; and &#8230;</li>
</ul>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.thirderror.com/deciphering-w3-html-validation-errors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
