<?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>Kaizou &#187; strict</title>
	<atom:link href="http://www.kaizou.org/tag/strict/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kaizou.org</link>
	<description>This is Web 2.71828</description>
	<lastBuildDate>Thu, 24 Nov 2011 09:34:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Differences between strict &amp; transitional (X)HTML</title>
		<link>http://www.kaizou.org/2009/03/differences-between-strict-transitional-xhtml/</link>
		<comments>http://www.kaizou.org/2009/03/differences-between-strict-transitional-xhtml/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 14:03:16 +0000</pubDate>
		<dc:creator>David Corvoysier</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[XHTML]]></category>
		<category><![CDATA[strict]]></category>
		<category><![CDATA[transitional]]></category>

		<guid isPermaLink="false">http://www.kaizou.org/?p=253</guid>
		<description><![CDATA[HTML and XHTML exist today in two flavors: strict and transitional. By default, a lot of editing tools or CMS use the transitional model. This is a shame because it may lead people to use a deprecated HTML syntax for presenting content instead of using CSS. This will lead to future incompatibilities and extensive use [...]]]></description>
			<content:encoded><![CDATA[<p>HTML and XHTML exist today in two flavors: strict and transitional. By default, a lot of editing tools or CMS use the transitional model.</p>
<p>This is a shame because it may lead people to use a deprecated HTML syntax for presenting content instead of using CSS. This will lead to future incompatibilities and extensive use of the <a href="http://en.wikipedia.org/wiki/Quirks_mode" alt="Quirks mode">&#8220;Quirks mode&#8221;</a>. </p>
<p>I will summarize below the main differences between the strict and transitional models. Then, the reader may be able to figure out whether he can safely switch to (X)HTML strict or not.</p>
<h3>Elements only allowed in transitional (X)HTML</h3>
<p>The list below has been compiled using this full <a href="http://www.blackwidows.co.uk/resources/tutorials/xhtml/element-comparison.php" alt="XHTML 1.0 Element Comparison by DTD">XHTML doctypes element comparison</a></p>
<ul>
<li><code>applet</code>,</li>
<li><code>basefont</code>,</li>
<li><code>center</code>,</li>
<li><code>dir</code>,</li>
<li><code>font</code>,</li>
<li><code>frame</code>,</li>
<li><code>frameset</code>,</li>
<li><code>iframe</code>,</li>
<li><code>isindex</code>,</li>
<li><code>menu</code>,</li>
<li><code>noframes</code>,</li>
<li><code>s</code>,</li>
<li><code>strike</code>,</li>
<li><code>u</code>,</li>
</ul>
<p>Today, only the iframe element is still used widespread, despite the fact that it can be replaced by <code>object</code>.</p>
<h3>Attributes only allowed in transitional (X)HTML</h3>
<p>The list below has been compiled using this full <a href="http://www.blackwidows.co.uk/resources/tutorials/xhtml/attributes-comparison.php" alt="XHTML1.0 Element Attributes by DTD">XHTML doctypes element attributes comparison</a></p>
<ul>
<li><code>align</code> in anything but tables-related elements,</li>
<li><code>alink</code>,</li>
<li><code>background</code>,</li>
<li><code>bgcolor</code>,</li>
<li><code>border</code>,</li>
<li><code>color</code>,</li>
<li><code>compact</code>,</li>
<li><code>dir</code>,</li>
<li><code>face</code>,</li>
<li><code>frameborder</code>,</li>
<li><code>height</code>,</li>
<li><code>hspace</code>,</li>
<li><code>ismap</code>,</li>
<li><code>height</code>,</li>
<li><code>lang</code>,</li>
<li><code>link</code>,</li>
<li><code>noshade</code>,</li>
<li><code>nowrap</code>,</li>
<li><code>object</code>,</li>
<li><code>size</code>,</li>
<li><code>start</code>,</li>
<li><code>target</code> on anchors <code>a</code>,</li>
<li><code>text</code>,</li>
<li><code>type</code>,</li>
<li><code>version</code>,</li>
<li><code>vlink</code>,</li>
<li><code>vspace</code>,</li>
<li><code>width</code>.</li>
</ul>
<p>As you can see, most of these attributes can easily be replaced by CSS rules. The only one that is still used widespread is <code>a.target</code>. In my humble opinion, this is not a problem, because you should not decide to open a link in a new window on behalf of the user. Anyway, if you really want to do that, you can still use javascript.</p>
<h3>Document structure constraints in strict (X)HTML</h3>
<p>The <code>body</code>, <code>blockquote</code> and <code>form</code> must only contain block-level elements like <code>div</code> or <code>span</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaizou.org/2009/03/differences-between-strict-transitional-xhtml/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Choosing the proper DOCTYPE</title>
		<link>http://www.kaizou.org/2009/03/choosing-the-proper-doctype/</link>
		<comments>http://www.kaizou.org/2009/03/choosing-the-proper-doctype/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 12:47:37 +0000</pubDate>
		<dc:creator>David Corvoysier</dc:creator>
				<category><![CDATA[HTML]]></category>
		<category><![CDATA[XHTML]]></category>
		<category><![CDATA[doctype]]></category>
		<category><![CDATA[strict]]></category>
		<category><![CDATA[transitional]]></category>

		<guid isPermaLink="false">http://www.kaizou.org/?p=234</guid>
		<description><![CDATA[I have been recently asked to tell the differences between HTML 4.0, XHTML 1.0 and HTML 5.0, and I had to dig in the specifications to provide an answer. Doing this, I realized that I did not really pay attention to the DOCTYPE declarations in my web pages so far, possibly leading to unexpected behaviours [...]]]></description>
			<content:encoded><![CDATA[<p>I have been recently asked to tell the differences between HTML 4.0, XHTML 1.0 and HTML 5.0, and I had to dig in the specifications to provide an answer. Doing this, I realized that I did not really pay attention to the DOCTYPE declarations in my web pages so far, possibly leading to unexpected behaviours in some browsers (see the very detailed article on Wikipedia about <a href="http://en.wikipedia.org/wiki/Quirks_mode" alt="Quirks mode">Quirks mode</a>).</p>
<p>To be short, HTML documents must start with a DOCTYPE declaration that is used by the browser to choose the appropriate rendering. It allows in particular to distinguish between real HTML documents and XHTML documents served as <code>text/html</code> to non-XHTML browsers (though required by the XHTML specification, the DOCTYPE declaration is actually redundant with the namepace declaration if the document is served as <code>application/xhtml+xml</code>).</p>
<p>The current HTML specification is <a href="http://www.w3.org/TR/html401/" alt="W3C HTML 4.01 specification">HTML 4.01</a> (1999). It defines three document types:</p>
<ul>
<li>HTML 4.01 strict, that relies entirely on CSS for presentation</li>
<li>HTML 4.01 transitional, that still allows <a href="/2009/03/differences-between-strict-transitional-xhtml/" alt="Differences between strict &#038; transitional (X)HTML">deprecated presentational markup</a></li>
<li>HTML 4.01 frameset, that must only be used to declare framesets</li>
</ul>
<p>In a first attempt to replace HTML 4.01, the W3C has defined <a href="http://www.w3.org/TR/xhtml1/" alt="W3C XHTML 1.0 specification">XHTML 1.0</a> (2000-2002), that redefines HTML 4.01 using a strict XML syntax. Unsurprisingly, XHTML 1.0 also defines three document types:</p>
<ul>
<li>XHTML 1.0 strict, that is exactly HTML 4.01 strict with closing tags,</li>
<li>XHTML 1.0 transitional, that is exactly HTML 4.01 transitional with closing tags,</li>
<li>XHTML 1.0 frameset, that must only be used to declare framesets.</li>
</ul>
<p>In a later standardization effort, the W3C produced <a href="http://www.w3.org/TR/xhtml11/" alt="W3C XHTML 1.1 Working Draft">XHTML 1.1</a> (WIP), that doesn&#8217;t add much, but defines only a strict DOCTYPE. It is no offense to the promoters of XHML 1.1 to say that it hasn&#8217;t yet been widely adopted (and to be honest it will probably go to oblivion soon since HTML 5 is on its way).</p>
<p>The upcoming <a href="http://www.w3.org/TR/html5/" alt="HTML 5 specification" >HTML 5 specification</a> takes a different approach and uses a single DOCTYPE for both HTML and XHTML documents (the DOCTYPE is optional for XHTML documents because it is redundant with their mime-type information: application/xhtml+xml). </p>
<p>To summarize, when developing a new page, the first thing you need to decide is if you want it to be HTML 5 or not.</p>
<p>If you go for HTML 5, then it is pretty straightforward: just add the following line at the top of your file:</p>
<p><code>&lt;!DOCTYPE html&gt;</code></p>
<p>If you want to address the legacy browsers, or if for any other reason you don&#8217;t want to use HTML 5, then you need to decide whether you are going to use HTML or XHTML. My recommendation is to always choose HTML unless you really need XHTML (for instance because you want to add <a href="/2009/02/svg-inline-in-xhtml/" alt="SVG inline in XHTML">inline SVG</a>).</p>
<p>Then, in both cases, unless you really need to use the <a href="http://www.kaizou.org/2009/03/differences-between-strict-transitional-xhtml/" alt="Differences between strict &#038; transitional (X)HTML">deprecated HTML syntax</a>, use the strict DOCTYPE.</p>
<h3>HTML</h3>
<p><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt;</code></p>
<h3>XHTML</h3>
<p><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"&gt;</code></p>
<p>Please note that according to the W3C XHTML guidelines, the XML declaration (<code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;</code>) should be omitted, as it triggers quirks mode in older versions of Internet Explorer. This is only a problem if you need to specify a different character encoding than UTF-8 (the default).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kaizou.org/2009/03/choosing-the-proper-doctype/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

