<?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>Sinceriously &#187; W3C</title>
	<atom:link href="http://www.sinceriously.com/tag/w3c/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sinceriously.com</link>
	<description>Designment and Development</description>
	<lastBuildDate>Sun, 18 Jul 2010 01:36:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>CDATA Run. Run, Data, Run!</title>
		<link>http://www.sinceriously.com/2009/02/cdata-run-run-data-run/</link>
		<comments>http://www.sinceriously.com/2009/02/cdata-run-run-data-run/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 22:03:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[standards compliance]]></category>
		<category><![CDATA[validation]]></category>
		<category><![CDATA[W3C]]></category>

		<guid isPermaLink="false">http://www.sinceriously.com/?p=78</guid>
		<description><![CDATA[Have you ever viewed the source of someone else&#8217;s webpage and seen gibberish like this: /* &#60;![CDATA[ *//* ]]&#62; */ Looks crazy. When I first ran across it, I assumed it was a random comment left by a developer (meaningful only to him or her). But there&#8217;s actually a really good reason why you&#8217;ll want [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever viewed the source of someone else&#8217;s webpage and seen gibberish like this:</p>
<div class="code-wrap"><code class="code-breakout">/* &lt;![CDATA[ */</code><code class="code-breakout">/* ]]&gt; */</code></div>
<p>Looks crazy. When I first ran across it, I assumed it was a random comment left by a developer (meaningful only to him or her). But there&#8217;s actually a really good reason why you&#8217;ll want to use this code.</p>
<p>When you validate a page using the <a href="http://validator.w3.org/" onclick="window.open(this.href); return false;">W3C Markup Validation Service</a>, the <code>&lt;</code> and <code>&gt;</code> characters are important. As a document is parsed, the validator relies on these characters to let it know when it has reached a tag in your HTML code. The parser uses a page&#8217;s tag hierarchy to understand the structure of your page and to determine if anything is invalid.</p>
<p>So, when it stumbles upon a random <code>&lt;</code> or <code>&gt;</code> in embedded JavaScript, the parser will get angry and return an error. (Note: Inline, or embedded, JavaScript is any script that is included directly in your HTML. It&#8217;s always a better practice to use external JavaScript files, but in the cases where inline scripts are unavoidable, continue reading.) The parser thinks it is encountering the beginning or ending of a tag, when in actuality it may have found a logical greater or lesser symbol instead.</p>
<p><span id="more-78"></span></p>
<p>To prohibit the parser from encountering and evaluating code, like JavaScript, surround the code in the gibberish above. For example:</p>
<div class="code-wrap"><code class="code-breakout">&lt;script type="text/javascript"&gt;</code><code class="code-breakout">/* &lt;![CDATA[ */</code><code class="code-breakout">... your code ...</code><code class="code-breakout">/* ]]&gt; */</code><code class="code-breakout">&lt;/script&gt;</code></div>
<p>Now your JavaScript is untouchable and will not anger pesky validators. Check those errors off the list! (All of the other errors really are your fault, though. Lazy developer.)</p>
<p>Note: The comment characters <code>/*</code> and <code>*/</code> are not required, but failure to include them will cause some JavaScript compilers to freak out. Be safe, include them.</p>
]]></content:encoded>
			<wfw:commentRss>http://js-kit.com/rss/www.sinceriously.com/p=78</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Windows, New Standards</title>
		<link>http://www.sinceriously.com/2009/02/new-windows-new-standards/</link>
		<comments>http://www.sinceriously.com/2009/02/new-windows-new-standards/#comments</comments>
		<pubDate>Sun, 22 Feb 2009 20:09:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[doctype]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[standards compliance]]></category>
		<category><![CDATA[validation]]></category>
		<category><![CDATA[W3C]]></category>

		<guid isPermaLink="false">http://www.sinceriously.com/?p=53</guid>
		<description><![CDATA[All of the sites I code nowadays conform to the XHTML 1.0 Strict doctype declaration (or DTD). Except this site since, by default, WordPress uses the XHTML 1.0 Transitional DTD. In olden days people would quite regularly use target="_blank" in their anchor tags to launch a URL in a new window. Sadly, the &#8220;target&#8221; attribute [...]]]></description>
			<content:encoded><![CDATA[<p>All of the sites I code nowadays conform to the XHTML 1.0 Strict <a href="http://www.w3.org/QA/2002/04/valid-dtd-list.html" onclick="window.open(this.href); return false;">doctype declaration (or DTD)</a>. Except this site since, by default, WordPress uses the XHTML 1.0 Transitional DTD. In olden days people would quite regularly use <code>target="_blank"</code> in their anchor tags to launch a URL in a new window. Sadly, the &#8220;target&#8221; attribute is no longer supported under the <strong>strict</strong> XHTML 1.0 doctype and will throw an error when <a href="http://validator.w3.org/" onclick="window.open(this.href); return false;"> attempting to validate your page</a>.</p>
<p>Googling for a standards-compliant alternative results in far too many options. Here&#8217;s the easiest and cleanest solution I&#8217;ve found:</p>
<div class="code-wrap"><code class="code-breakout">&lt;a href="some-url.html" onclick="window.open(this.href); return false;"&gt;Your Link&lt;/a&gt;</code></div>
<p>Extremely compact and efficient.</p>
<p>While we&#8217;re on the topic, don&#8217;t validate this blog. It has 32 errors and 11 warnings, according to the W3C. No, this isn&#8217;t one of those &#8220;do as I say, not as I do&#8221; copouts. I plan to try and eliminate all errors and will even write a post about the process since, IMHO, validating your site is one of the most important things you should do before launching it.</p>
]]></content:encoded>
			<wfw:commentRss>http://js-kit.com/rss/www.sinceriously.com/p=53</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
