<?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>Learning the World &#187; XHTML</title>
	<atom:link href="http://learningtheworld.eu/tag/xhtml/feed/" rel="self" type="application/rss+xml" />
	<link>http://learningtheworld.eu</link>
	<description></description>
	<lastBuildDate>Tue, 06 Nov 2012 00:17:33 +0000</lastBuildDate>
	<language>en-US</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.9.1</generator>
	<item>
		<title>Embedding YouTube Video with iPhone Fallback</title>
		<link>http://learningtheworld.eu/2009/youtube-embed/</link>
		<comments>http://learningtheworld.eu/2009/youtube-embed/#comments</comments>
		<pubDate>Wed, 25 Nov 2009 17:00:01 +0000</pubDate>
		<dc:creator><![CDATA[Martin Kliehm]]></dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[embed]]></category>
		<category><![CDATA[fallback]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[object]]></category>
		<category><![CDATA[video]]></category>
		<category><![CDATA[web standards]]></category>
		<category><![CDATA[XHTML]]></category>
		<category><![CDATA[youtube]]></category>

		<guid isPermaLink="false">http://learningtheworld.eu/?p=729</guid>
		<description><![CDATA[Just a quick note as a reminder to myself <strong>how to embed YouTube videos</strong> in a standards compliant, valid <acronym title="Extensible Hypertext Markup Language">XHTML</acronym> syntax. It works across all current browsers, doesn&#8217;t use <code>&#60;embed&#62;</code>, and has the elegant fallback displaying a still image that is linked to YouTube, thus enabling iPhone users without Flash to view the video.]]></description>
				<content:encoded><![CDATA[<p>Just a quick note as a reminder to myself <strong>how to embed YouTube videos</strong> in a standards compliant, valid <acronym title="Extensible Hypertext Markup Language">XHTML</acronym> syntax. It works across all current browsers, doesn&rsquo;t use <code>&lt;embed&gt;</code>, and has the elegant fallback displaying a still image that is linked to YouTube, thus enabling iPhone users without Flash to view the video.</p>

<ol class="code">
<li><code>&lt;object type=&quot;application/x-shockwave-flash&quot; data=&quot;http://www.youtube.com/<span class="codeSpace">&nbsp;</span>v/<span class="codeSpace">&nbsp;</span><em>VideoID</em>&quot; width=&quot;480&quot; height=&quot;360&quot;></code></li>
<li class="indent"><code>&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/<span class="codeSpace">&nbsp;</span>v/<span class="codeSpace">&nbsp;</span><em>VideoID</em>&quot; /&gt;</code></li>
<li class="indent"><code>&lt;param name=&quot;quality&quot; value=&quot;high&quot; /&gt;</code></li>
<li class="indent"><code>&lt;param name=&quot;allowFullScreen&quot; value=&quot;true&quot; /&gt;</code></li>
<li class="indent"><code><strong>&lt;!-- Fallback content --&gt;</strong></code></li>
<li class="indent"><code>&lt;a href=&quot;http://www.youtube.com/<span class="codeSpace">&nbsp;</span>watch?<span class="codeSpace">&nbsp;</span>v=<em>VideoID</em>&quot;&gt;</code></li>
<li class="indent"><span class="indent"><code>&lt;img src=&quot;http://img.youtube.com/<span class="codeSpace">&nbsp;</span>vi/<span class="codeSpace">&nbsp;</span><em>VideoID</em>/0.jpg&quot; width=&quot;480&quot; height=&quot;360&quot; alt=&quot;[Video title]&quot; /&gt;<br />YouTube Video</code></span></li>
<li class="indent"><code>&lt;/a&gt;</code></li>
<li><code>&lt;/object&gt;</code></li>
</ol>

<p>Please note that there are spaces in the code above to allow linebreaks. If you copy and paste you need to remove those. <img src="http://learningtheworld.eu/wp-includes/images/smilies/icon_wink.gif" alt=";)" class="wp-smiley" /> </p>

<p>Here is an example:</p>

<p><object type="application/x-shockwave-flash" data="http://www.youtube.com/v/ybPeQUEgk-0" width="425" height="344">
<param name="movie" value="http://www.youtube.com/v/ybPeQUEgk-0" />
<param name="quality" value="high" />
<param name="allowFullScreen" value="true" />
<a href="http://www.youtube.com/watch?v=ybPeQUEgk-0">
<img src="http://img.youtube.com/vi/ybPeQUEgk-0/0.jpg" width="425" height="344" alt="Little 'Tinker Cartoon" />
YouTube Video
</a>
</object></p>
]]></content:encoded>
			<wfw:commentRss>http://learningtheworld.eu/2009/youtube-embed/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Farewell, XML declaration</title>
		<link>http://learningtheworld.eu/2008/farewell-xml-declaration/</link>
		<comments>http://learningtheworld.eu/2008/farewell-xml-declaration/#comments</comments>
		<pubDate>Wed, 04 Jun 2008 16:00:04 +0000</pubDate>
		<dc:creator><![CDATA[Martin Kliehm]]></dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[web standards]]></category>
		<category><![CDATA[2014]]></category>
		<category><![CDATA[bug]]></category>
		<category><![CDATA[declaration]]></category>
		<category><![CDATA[ie6]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[quirks-mode]]></category>
		<category><![CDATA[Richard Ishida]]></category>
		<category><![CDATA[utf-8]]></category>
		<category><![CDATA[XHTML]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://learningtheworld.eu/?p=102</guid>
		<description><![CDATA[The <acronym title="Extensible Markup Language">XML</acronym> declaration is <em>not required</em> as long as you encode in UTF-8 or UTF-16, you are only strongly encouraged to use it. So as long we are stuck with <acronym>IE6</acronym> I will refrain from using it.&#160;[&#8230;]]]></description>
				<content:encoded><![CDATA[<p>For years I have been using an <strong><acronym title="Extensible Markup Language">XML</acronym> declaration</strong> prior to my DOCTYPE declaration:</p>

<ol class="code">
<li><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;&nbsp;?&gt;</code></li>
<li><code>&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Strict//EN&quot; &quot;http://www.w3.org/<span class="codeSpace">&nbsp;</span>TR/xhtml1/DTD/<span class="codeSpace">&nbsp;</span>xhtml1-strict.dtd&quot;&gt;</code></li>
</ol>

<p>It was obvious for me that such a declaration would be a good thing to have since <strong><acronym title="Extensible Hypertext Markup Language">XHTML</acronym> is <acronym>XML</acronym></strong> after all. Only later I learned that it triggers a bug in <acronym title="Internet Explorer 6">IE6</acronym> to render pages in <strong>quirks mode</strong> with a <strong>broken box model</strong>. But I was used to build workarounds for Internet Explorer bugs since <acronym>IE</acronym> 3.0 and never knew anything but the broken box model in <acronym>IE</acronym>, so I continued to use the declaration.</p>

<p>Until recently my colleague Thomas Junghans took the trouble to research, and found this phrase in the <a href="http://www.w3.org/TR/xhtml1/#strict"><acronym>XHTML</acronym> specification</a>:</p>

<blockquote cite="http://www.w3.org/TR/xhtml1/#strict"><p>An <acronym>XML</acronym> declaration is not required in all <acronym>XML</acronym> documents; however <acronym>XHTML</acronym> document authors are strongly encouraged to use <acronym>XML</acronym> declarations in all their documents. Such a declaration is required when the character encoding of the document is other than the default UTF-8 or UTF-16 and no encoding was determined by a higher-level protocol.</p></blockquote>

<p>The declaration is <strong>not required</strong> as long as you encode in UTF-8 or UTF-16, you are only strongly encouraged to use it. Gasp!</p>

<p>Richard Ishida lists some <a href="http://www.w3.org/International/tutorials/tutorial-char-enc/#Slide0330">advantages of using the declaration</a> when serving the pages with an <acronym>XML</acronym> <acronym>MIME</acronym> type or viewing them offline, however I&rsquo;m convinced the disadvantages prevail.</p>

<p>So as long we are stuck with <acronym>IE6</acronym> &mdash; and people say that could be as long as 2014 when <a href="http://support.microsoft.com/lifecycle/?LN=en-gb&#038;x=16&#038;y=12&#038;C2=1173">support for Windows <acronym>XP</acronym></a> ends (reminder to self: throw a party on 8 April, 2014)&nbsp;&mdash; I&nbsp;will refrain from using the <acronym>XML</acronym> declaration. Amen.</p>
]]></content:encoded>
			<wfw:commentRss>http://learningtheworld.eu/2008/farewell-xml-declaration/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>The XHTML Access Module</title>
		<link>http://learningtheworld.eu/2008/xhtml-access-module/</link>
		<comments>http://learningtheworld.eu/2008/xhtml-access-module/#comments</comments>
		<pubDate>Fri, 11 Jan 2008 20:45:21 +0000</pubDate>
		<dc:creator><![CDATA[Martin Kliehm]]></dc:creator>
				<category><![CDATA[accessibility]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[web standards]]></category>
		<category><![CDATA[access]]></category>
		<category><![CDATA[aria]]></category>
		<category><![CDATA[element]]></category>
		<category><![CDATA[module]]></category>
		<category><![CDATA[ria]]></category>
		<category><![CDATA[Richard Schwerdtfeger]]></category>
		<category><![CDATA[role]]></category>
		<category><![CDATA[T.V. Raman]]></category>
		<category><![CDATA[tv]]></category>
		<category><![CDATA[working draft]]></category>
		<category><![CDATA[XHTML]]></category>
		<category><![CDATA[XHTML 1.1]]></category>
		<category><![CDATA[XHTML 2.0]]></category>
		<category><![CDATA[xhtml-role]]></category>

		<guid isPermaLink="false">http://learningtheworld.eu/2008/xhtml-access-module/</guid>
		<description><![CDATA[I would like to introduce the <strong><acronym title="Extensible Hypertext Markup Language">XHTML</acronym> Access Module</strong>, a new working draft released by the <acronym>XHTML</acronym>&#160;2 Working Group of the World Wide Web Consortium (<acronym>W3C</acronym>). The module is intended to improve accessibility and extend <acronym>XHTML</acronym> Roles.&#160;[&#8230;]]]></description>
				<content:encoded><![CDATA[<p>I would like to introduce the <strong><a href="http://www.w3.org/TR/xhtml-access/"><acronym title="Extensible Hypertext Markup Language">XHTML</acronym> Access Module</a></strong>, a new working draft released by the <acronym>XHTML</acronym>&nbsp;2 Working Group of the World Wide Web Consortium (<acronym>W3C</acronym>). As you know, the <em>X</em> in <acronym>XHTML</acronym> stands for &ldquo;extensible.&rdquo; Also you may have heard that <acronym>XHTML</acronym> 1.1 and 2 are modular specifications, so it&rsquo;s easier and more flexible to extend the core modules by bolting some extra modules on whenever special features are required. I have described before how to extend <acronym>XHTML</acronym> with the <a href="/2007/xhtml-with-target/">Target Module</a> or the <a href="http://www.alistapart.com/articles/waiaria#implementations">Accessible Rich Internet Applications (<acronym>ARIA</acronym>) modules</a>. So the <acronym>XHTML</acronym> Access Module is a new module intended to <strong>improve accessibility</strong> and extend <a href="http://www.alistapart.com/articles/waiaria#role"><acronym>XHTML</acronym> Roles</a>.</p>

<p>Otherwise the draft&rsquo;s abstract and introduction are vague and leave room for interpretation what this is exactly about. What I have understood is:</p>

<ol>
<li>This module defines <strong>a new element</strong> with the name <code>access</code>.</li>
<li>The element can be used to define an <strong>access key</strong> for any other element.</li>
<li>Another usage <em>could</em> be as a skip link as there is a <code>targetid</code> and <code>targetrole</code> attribute.</li>
</ol>

<p>For me it remained unclear whether this element belongs in the <code>head</code> like <code>link</code> elements, or in the <code>body</code> like anchors or <code>label</code> elements. Anyway, among other <a href="http://www.w3.org/TR/2002/WD-xhtml2-20020805/mod-attribute-collections.html#col_Common">Common attributes</a> it can have a <code>title</code> plus a few <strong>new attributes</strong>: <code>key</code>, <code>targetid</code>, <code>targetrole</code>, and <code>activate</code>.</p>

<ul>
<li>The <code>key</code> attribute is optional and defines an <strong>access key</strong> in a generic way. So far there was only the <code>accesskey</code> attribute for anchors and form elements, now any fancy Web&nbsp;2.0 <code>div</code> element impersonating something else can receive focus by striking a key. Browser vendors are encouraged to emphasize the responsive character in a word, like underlining it. Also the working draft provides a description what user agents should do if there are conflicts with existing shortcut keys. So the team paid attention to the discussions about the reasonableness of the <code>accesskey</code> attribute.</li>
<li>The <code>targetid</code> and <code>targetrole</code> attributes <strong>assign targets</strong> by <code>id</code> or <code>role</code>. There can be more than one of each, comma separated. I imagine that&rsquo;s like tabbing through elements, but with a shortcut key.</li>
<li>The last new <code>access</code> attribute is <code>activate</code>. I must admit I have no clear idea what &ldquo;activate&rdquo; could mean or what this attribute is good for. An element receives focus, so there should be a perceivable effect, some sort of feedback to the user. If an author does not want this, there are ways to suppress default renderings by <acronym title="Cascading Stylesheets">CSS</acronym>. If she doesn&rsquo;t want the <code>focus</code> event to trigger something, there&rsquo;s JavaScript to cancel it.</li>
</ul>

<p>I thought of playing with the new element, but it&rsquo;s too early for a <strong>test implementation</strong>. The working draft still lacks a <acronym title="Extensible Markup Language">XML</acronym> Schema that could be used in namespaces. It would be possible to <a href="/2007/xhtml-with-target/#dtd-extension">extend a <acronym title="Document Type Definition">DTD</acronym></a> without much conflicts, alas the module doesn&rsquo;t come in one box, but in two (again). So you would need to append both the <em>qname</em> module and the <em>access</em> module instead of simply adding <em>the</em> access module. I don&rsquo;t understand the rationale for this separation, but I see it&rsquo;s more painful for an author to implement it that way.</p>

<p>However, the <code>access</code> element provides a better and more generic functionality than existing alternatives, it fills the gap of missing access keys, and if I got it right it defines a standardized method for skip links, although this could be expressed clearer. Apart from the usual suspects there is Google&rsquo;s accessibility specialist <strong><a href="http://emacspeak.sourceforge.net/raman/">T. V. Raman</a></strong> on the team, and <strong><a href="http://www-128.ibm.com/developerworks/blogs/page/schwer">Richard Schwerdtfeger</a></strong> from the team that built more accessibility into Firefox, the Open Document Format, and IAccessible2 as an accessibility interface for screen readers. So my bet is we will see support for this element in our favorite browser as soon as this draft is more mature. Your turn, Microsoft.</p>
]]></content:encoded>
			<wfw:commentRss>http://learningtheworld.eu/2008/xhtml-access-module/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XHTML 1.1 Second Edition with Target Attribute</title>
		<link>http://learningtheworld.eu/2007/xhtml-with-target/</link>
		<comments>http://learningtheworld.eu/2007/xhtml-with-target/#comments</comments>
		<pubDate>Thu, 22 Feb 2007 16:30:35 +0000</pubDate>
		<dc:creator><![CDATA[Martin Kliehm]]></dc:creator>
				<category><![CDATA[downloads]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[web standards]]></category>
		<category><![CDATA[attribute]]></category>
		<category><![CDATA[HTML WG]]></category>
		<category><![CDATA[module]]></category>
		<category><![CDATA[Second Edition]]></category>
		<category><![CDATA[target]]></category>
		<category><![CDATA[working draft]]></category>
		<category><![CDATA[XHTML]]></category>
		<category><![CDATA[XHTML 1.1]]></category>

		<guid isPermaLink="false">http://learningtheworld.eu/2007/xhtml-with-target/</guid>
		<description><![CDATA[When I switched from <acronym title="Hypertext Markup Language">HTML</acronym>&#160;4 to <acronym title="Extensible Hypertext Markup Language">XHTML</acronym>&#160;1.1 a couple of years ago, I soon found the <strong><code>target</code> attribute</strong> was missing. I have never been in love with the <code>target</code> attribute anyway, but some clients insisted that their links should open in a new window. So I did some research. [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>When I switched from <acronym title="Hypertext Markup Language">HTML</acronym>&nbsp;4 to <acronym title="Extensible Hypertext Markup Language">XHTML</acronym>&nbsp;1.1 a couple of years ago, I soon found <strong>the <code>target</code> attribute was missing.</strong> I have never been in love with the <code>target</code> attribute anyway, but some clients insisted that their links should open in a new window. So I did some research.</p>

<p>You won&rsquo;t believe how much <a href="http://www.thinkvitamin.com/features/design/dont-be-the-weakest-link#comments" title="Comments on a Vitamin article">myth</a> and <a href="http://www.456bereastreet.com/archive/200603/the_target_attribute_and_opening_new_windows/" title="Roger Johansson: The target attribute and opening new windows">misinformation</a> is out there. Some say <strong>it&rsquo;s deprecated</strong>. In fact it never was. It is part of <acronym>XHTML</acronym>&nbsp;2 and <acronym>XHTML</acronym> Basic, and there is a <code>target</code> module in <acronym>XHTML</acronym>&nbsp;1.1, the modularized version of <acronym>XHTML</acronym>. The attribute is not included in <acronym>HTML</acronym>&nbsp;4.01 Strict and <acronym>XHTML</acronym>&nbsp;1.0 Strict because it was then considered to be related to <code>frame</code>s and <code>iframe</code>s, but it&rsquo;s not marked &ldquo;deprecated.&rdquo; It was simply not in the core set of modules for the <acronym>XHTML</acronym>&nbsp;1.1 driver.</p>

<p>Some people argued <strong>it&rsquo;s a behavior</strong> and thus belongs into <a href="http://www.thefutureoftheweb.com/blog/target-blank-xhtml11">unobtrusive JavaScript</a>. But then clicking on a link to get to another page is also some functionality, and nobody would think of replacing anchors with loads of bloated script to simulate such a basic behavior.</p>

<p id="dtd-extension">So I ended up <strong>extending the extensible</strong> with a <a href="/dtd/xhtml-target.dtd" type="application/xml-dtd">customized <acronym title="Document Tpe Definition">DTD</acronym></a>:</p>

<ol class="code">
<li><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;iso-8859-1&quot;?&gt;</code></li>
<li>&lt;!&#45;- Bring in the XHTML 1.1 driver -&#45;&gt;</li>
<li><code>&lt;!ENTITY % xhtml11.dtd</code></li>
<li class="indent"><code>PUBLIC &quot;-//W3C//DTD XHTML 1.1//EN&quot;</code></li>
<li class="indent"><code>&quot;http://www.w3.org/TR/xhtml11/<span class="codeSpace">&nbsp;</span>DTD/xhtml11.dtd&quot;&gt;</code></li>
<li><code>%xhtml11.dtd;</code></li>
<li>&nbsp;</li>
<li>&lt;!&#45;- Bring in the Target Module -&#45;&gt;</li>
<li><code>&lt;!ENTITY % xhtml-target.mod</code></li>
<li class="indent"><code>PUBLIC &quot;-//W3C//ELEMENTS XHTML Target 1.0//EN&quot;</code></li>
<li class="indent"><code>&quot;http://www.w3.org/TR/<span class="codeSpace">&nbsp;</span>xhtml-modularization/DTD/<span class="codeSpace">&nbsp;</span>xhtml-target-1.mod&quot;&gt;</code></li>
<li><code>%xhtml-target.mod;</code></li>
</ol>

<p>However, now I have to bid farewell to that bizarre old friend: the working draft of <a href="http://www.w3.org/TR/2007/WD-xhtml11-20070216/xhtml11-diff.html#a_xhtml11_driver"><acronym>XHTML</acronym>&nbsp;1.1 Second Edition</a> includes the <strong><code>target</code> module in the core set</strong>, finally. I&rsquo;m relieved because tinkering with <acronym>DTD</acronym>s is a pain, but it had style&nbsp;&hellip;</p>

<p>Note that in the current version <code>target</code> is not yet included in <acronym>XHTML</acronym>&nbsp;1.1 <em>Schema</em>, but I have been assured it will <a href="http://lists.w3.org/Archives/Public/www-html-editor/2007JanMar/0033.html">definitely be in the final version</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://learningtheworld.eu/2007/xhtml-with-target/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Reforming HTML</title>
		<link>http://learningtheworld.eu/2006/reforming-html/</link>
		<comments>http://learningtheworld.eu/2006/reforming-html/#comments</comments>
		<pubDate>Mon, 30 Oct 2006 12:18:29 +0000</pubDate>
		<dc:creator><![CDATA[Martin Kliehm]]></dc:creator>
				<category><![CDATA[W3C]]></category>
		<category><![CDATA[web standards]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[HTML forms]]></category>
		<category><![CDATA[reforms]]></category>
		<category><![CDATA[Tim Berners-Lee]]></category>
		<category><![CDATA[W3C validator]]></category>
		<category><![CDATA[web forms]]></category>
		<category><![CDATA[XForms]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://learningtheworld.eu/2006/reforming-html/</guid>
		<description><![CDATA[Many good people have expressed their concern about the state of the <acronym title="World Wide Web Consortium">W3C</acronym>. Tim Berners-Lee responded earlier, now he announced reforms in his blog.&#160;[&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Many good people have expressed their <strong>concern</strong> about the state of the <acronym title="World Wide Web Consortium">W3C</acronym>, like <a href="http://www.zeldman.com/2006/07/17/an-angry-fix/" rel="colleague">Jeffrey Zeldmann</a>, <a href="http://www.webstandards.org/2006/07/26/misplaced-anger-a-rebuttal-to-zeldmans-criticism-of-the-w3c/" rel="colleague met">Molly Holzschlag</a>, <a href="http://meyerweb.com/eric/thoughts/2006/09/14/w3c-change-introduction/" rel="colleague met">Eric Meyer</a>, or <a href="http://lists.w3.org/Archives/Public/public-qa-dev/2006Jul/0011" xml:lang="de" lang="de" rel="colleague">Björn Höhrmann</a>. <strong>Tim Berners-Lee</strong> <a href="http://lists.w3.org/Archives/Public/public-qa-dev/2006Jul/0020" title="Response to Björn Höhrmann&rsquo;s letter">responded</a> a few months ago. Now he <a href="http://dig.csail.mit.edu/breadcrumbs/node/166" title="TBL&rsquo;s blog: &ldquo;Reinventing HTML&rdquo;">announced reforms</a> in his TimBL blog.</p>

<p>The transition from <acronym title="Hypertext Markup Language">HTML</acronym> to <acronym title="Extensible Hypertext Markup Language">XML</acronym> has failed, so they will evolve <acronym>HTML</acronym> incrementally with more powerful <strong><acronym title="Extensible Hypertext Markup Language">XHTML</acronym></strong> features as incentives for switching. We have seen that recently with the <acronym>XHTML</acronym>&nbsp;1.1 <a href="http://www.w3.org/TR/xhtml-role/"><code>role</code> attribute module</a>. Another <acronym>XHTML</acronym>&nbsp;2.0 feature I can foresee as a <acronym>XHTML</acronym>&nbsp;1.1 module is the <code>href</code> attribute on <em>all</em> elements, not just anchors. Convince a browser vendor to implement this feature, and if developers want to play with the cool stuff, they have to switch to <acronym>XHTML</acronym>&nbsp;&hellip;</p>

<p>The development process of the drafts will be controlled by a <strong><em>new</em> <acronym>HTML</acronym> group</strong> with different chair and staff contact. Also the work on <a href="http://www.w3.org/TR/xhtml2/">XHTML&nbsp;2</a> will proceed independently from HTML. <strong>HTML forms</strong> will be <a href="http://www.w3.org/TR/web-forms-2/" title="Web Forms 2.0">extended</a> to become a subset of the powerful <a href="http://www.w3.org/MarkUp/Forms/">XForms</a>. And the <acronym>W3C</acronym> finally bought some <strong>new server hardware for the <acronym>W3C</acronym> validator</strong>.</p>

<p>The new groups shall be more responsive, with powerful issue tracking systems, but at the same time Berners-Lee asks for respectfulness and <strong>social awareness</strong>. We are not talking about technical issues alone. There are people and their feelings involved as well, and we have to pay more respect to that.</p>

<p>Get involved! You can <a href="http://www.w3.org/QA/2006/10/reinventing_html_discuss">discuss on the <acronym>W3C</acronym> <acronym title="Quality Assurance">QA</acronym> blog</a> about the proposal, or participate in the <a href="http://www.w3.org/QA/IG/">QA interest group</a>, the <a href="http://www.w3.org/International/geo/"><acronym title="Internationalization">I18N</acronym></a> or the <a href="http://www.w3.org/WAI/EO/"><acronym title="Web Accessibility Initiative">WAI</acronym> outreach working groups</a>&nbsp;&mdash; even if your company is not a member of the <acronym>W3C</acronym>.</p>

<h3 id="other-opinions">Other opinions on this topic:</h3>

<ul>
<li>Anne van Kesteren: <a href="http://annevankesteren.nl/2006/10/html-wg">Victory: new <acronym>HTML</acronym> <acronym title="Working Group">WG</acronym></a></li>
<li>Joe Clark: <a href="http://blog.fawny.org/2006/10/28/tbl-html/">How not to fix <acronym>HTML</acronym></a></li>
<li>Roger Johansson: <a href="http://www.456bereastreet.com/archive/200610/new_w3c_working_group_to_improve_html/">New <acronym>W3C</acronym> working group to improve <acronym>HTML</acronym></a></li>
<li>Sean Fraser: <a href="http://www.elementary-group-standards.com/web-standards/w3c-html-reinvention.html"><acronym>W3C</acronym> <acronym>HTML</acronym> Reinvention</a></li>
<li>Chris Wilson: <a href="http://blogs.msdn.com/cwilso/archive/2007/01/10/you-me-and-the-w3c-aka-reinventing-html.aspx">You, me and the <acronym title="World Wide Web Consortium">W3C</acronym></a> (<abbr title="also known as">aka</abbr> Reinventing <acronym>HTML</acronym>)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://learningtheworld.eu/2006/reforming-html/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Best Practices in Web Development</title>
		<link>http://learningtheworld.eu/2006/best-practices/</link>
		<comments>http://learningtheworld.eu/2006/best-practices/#comments</comments>
		<pubDate>Mon, 10 Jul 2006 16:56:19 +0000</pubDate>
		<dc:creator><![CDATA[Martin Kliehm]]></dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[web standards]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[checklist]]></category>
		<category><![CDATA[common errors]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS reboot]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[new professionalism]]></category>
		<category><![CDATA[Roger Johansson]]></category>
		<category><![CDATA[Sean Fraser]]></category>
		<category><![CDATA[XHTML]]></category>

		<guid isPermaLink="false">http://learningtheworld.eu/2006/best-practices/</guid>
		<description><![CDATA[Roger Johansson and Sean Fraser recently reviewed websites which were submitted for the CSS Reboot Spring 2006, and they seemed to be quite shocked when 71.8% failed to validate. While this is sobering and to a degree surprising â€” one might expect better results from CSS aware developers on a relaunch â€” it confirmed my own results from reviewing a couple of high profile websites for clients.&#160;[&#8230;]]]></description>
				<content:encoded><![CDATA[<p id="intro"><strong><a href="http://www.456bereastreet.com/archive/200606/css_reboot_participants_far_from_standardsbased/" rel="colleague met" title="Roger Johansson about CSS reboot">Roger Johansson</a> and <a href="http://www.elementary-group-standards.com/web-standards/css-reboot-as-web-standards-validation-indicator.html" title="Sean Fraser about CSS reboot" rel="colleague">Sean Fraser</a> recently reviewed websites which were submitted for the <a href="http://www.cssreboot.com"><acronym title="Cascading Style Sheets">CSS</acronym> Reboot Spring 2006</a>, and they seemed to be quite shocked when 71.8% failed to validate.</strong> While this is sobering and to a degree surprising &mdash; one might expect better results from <acronym>CSS</acronym> aware developers on a relaunch &mdash; it confirmed my own results from reviewing a couple of high profile websites for clients.</p>

<h3 id="toc">In this article:</h3>

<ul class="toc">
    <li><a href="#case-study">Case study</a></li>
    <li><a href="#html">Best practices in <acronym title="Hypertext Markup Language">HTML</acronym></a></li>
    <li><a href="#css">Best practices in <acronym>CSS</acronym></a></li>
    <li><a href="#search-engines">Best practices for search engines</a></li>
</ul>

<h3 id="case-study">Case study</h3>

<p id="cs-intro">Over the years we made several <strong>technical analyses</strong> for the clients&rsquo; own websites and some of their competitors, including major German broadcasting companies, TV program journals, and a couple of large online travel sites.</p>

<p id="cs-scope">We were checking for overall performance like file sizes as well as best practices in <acronym title="Extensible Hypertext Markup Language">(X)HTML</acronym>, <acronym>CSS</acronym>, semantics, and some other aspects of friendliness to users and search engines. We mostly skipped accessibility because there were already severe errors in the other areas.</p>

<p id="cs-summary">It&rsquo;s not like these websites were made by some backstreet <del>crack houses</del> <ins>agencies</ins>. All have a well-known logo stuck to them, most of them get more than a million visits each month, some up to more than a hundred million. Still the reviews felt like a time-travel to 1998. In our elite circles we speak about a &ldquo;<a href="http://www.webstandards.org/2005/11/15/web-standards-and-the-new-professionalism/" title="Molly Holzschlag on the Web Standards Project (WaSP) website about new professionalism" rel="colleague met">new professionalism</a>,&rdquo; but <acronym>HTML</acronym> in the wild is <em>still</em> a <em>very</em> dark and ugly jungle.</p>

<p id="cs-common-errors"><strong>Most common errors</strong> were missing <code>alt</code>-attributes and unencoded <span class="nowrap"><code>&amp;</code>-characters</span> in <acronym title="Uniform Resource Locator">URL</acronym>s. Also quite common were <acronym title="Extensible Markup Language">XML</acronym> endslashes in <acronym>HTML</acronym> documents, or hacks from the nineties: proprietary attributes like <code>background</code> in table data, <code>height</code> in a table row, <code>marginwidth</code>, <code>marginheight</code>, <code>topmargin</code> and <code>leftmargin</code>, or missing <code>type</code> attributes in <code>style</code> and <code>script</code> tags.</p>

<p id="cs-proprietary-tags">Getting into the depths of old-school programming we found proprietary tags like <code>&lt;nobr&gt;</code>, <code>&lt;ilayer&gt;</code>, or <code>&lt;spacer&gt;</code>, misconceptions like <code>valign=&quot;center&quot;</code> instead of <code>&quot;middle&quot;</code>, forgotten closing tags, or tag soup like the classic <code>form</code> between table rows (to prevent top margins), block level elements inside of inline elements, <code>&lt;p&gt;</code> tags around everything (including tables and headlines!), or <code>script</code> tags before or after <code>&lt;html&gt; &lt;/html&gt;</code>. Especially ad servers and site statistics were infamous for their crappy stone-age code.</p>

<p id="cs-dtd">Only a few were missing a doctype declaration (DTD) altogether, most ran <acronym>HTML</acronym> transitional 4.01 in quirks mode, only one claimed to be <acronym>XHTML</acronym>&nbsp;1.1 (<em>gasp</em>). Seven out of ten had a charset encoding, but only the <acronym>XHTML</acronym> website did care to define the site&rsquo;s language. Almost all had no clue about <acronym>CSS</acronym> positioning and used table layout.</p>

<p id="cs-basics">Sometimes we encountered code where developers obviously hadn&rsquo;t understood even the most basic principles of <acronym>CSS</acronym>&nbsp;1. They used either <code>font</code> tags with <code>style</code> attributes, or other tags just <em>like</em> <code>font</code> tags with a lot of repeated inline <code>style</code>. Thus the advantages of <acronym>CSS</acronym> through central style sheets with classes and IDs were counteracted.</p>

<p id="cs-file-size">It didn&rsquo;t come as a surprise that the few websites using <acronym>CSS</acronym>&nbsp;2 for layout had <strong>significant smaller file sizes</strong>. Those with <acronym>CSS</acronym>&nbsp;2 had between 15-21&nbsp;<abbr title="Kilobyte">KB</abbr> of <acronym>HTML</acronym>, their competitors with table layout 55-95&nbsp;<abbr>KB</abbr>. Still you got to pay attention to the file size of images and rich media (including banners) as they frequently blow up the total amount. Be aware of <acronym title="Dynamic HTML">DHTML</acronym> menus, as they have a tendency to get out of control sizewise (<abbr title="40 kilobytes">40k</abbr> JavaScript in one case, <abbr title="85 kilobytes">85k</abbr> in another). Less than a total of <abbr title="100 kilobytes">100k</abbr> for the home page should be sufficient, even for sites with rich graphic interfaces.</p>

<p id="cs-checklist">I don&rsquo;t want to bore you with further rants about burning bandwidth with <abbr title="600 kilobytes">600k</abbr> large home pages (multiply <em>that</em> by a million), hence we thought positive and made a <strong>checklist of best practices</strong>. Although the checkpoints appear to be quite obvious and common sense when you read them, you might be surprised that the best website managed to fulfil 22 out of 29 checkpoints, the worst only 8, with an average of 12.</p>

<p id="cs-job-test">By the way, the <acronym>HTML</acronym> and <acronym>CSS</acronym> part of the checklist is more or less the same we use for testing the qualifications of <em>job applicants</em>. We associated a severity grade (<em>major</em>, <em>average</em>, <em>minor</em>) with each checkpoint, and for each error in the small task we give them we subtract 3, 2, or 1 point(s) respectively from a maximum of 100. Half the amount is subtracted when a checkpoint is partially fulfilled. We adopted that system from the German <a href="http://www.bitvtest.de" hreflang="de">accessibility test</a> &mdash; it&rsquo;s fair and a great way to compare test results.</p>

<p id="cs-checklist-intro">Here&rsquo;s the short version of our checklist. Feel free to make your own severity rating. Just be consistent in your own tests to get comparable results.</p>

<h3 id="html">Best practices in <acronym>HTML</acronym></h3>

<ol class="alpha">
    <li id="html-validation">The document <a href="http://validator.w3.org" title="External link to the World Wide Web Committee&rsquo;s validator">must validate</a> as <acronym>HTML</acronym> or <acronym>XHTML</acronym>.</li>
    <li id="html-dtd">The document must have a <strong><acronym title="Doctype Declaration">DTD</acronym></strong>.</li>
    <li id="html-character-encoding">The document must have a <a href="http://www.w3.org/TR/html401/charset.html#h-5.2.1" title="HTML 4.01 specification about character encoding">character encoding</a>, either through a <acronym title="Hypertext Transfer Protocol">HTTP</acronym> header or a <code>meta</code> tag.</li>
    <li id="html-language">
        <p>The document should have the <strong>language defined</strong> in the following ways:</p>
        <ul>
            <li><code>&lt;html lang=&quot;en&quot;&gt;</code></li>
            <li><code>&lt;html xml:lang=&quot;en&quot;&gt;</code></li>
            <li><code>&lt;meta name=&quot;content-language&quot; content=&quot;en&quot;&gt;</code></li>
        </ul>
    </li>
    <li id="html-quotes">All <strong>attribute values <a href="http://www.w3.org/TR/html4/intro/sgmltut.html#idx-attribute-6" title="HTML 4.01 Specification about quotes">should be quoted</a></strong>. In <acronym>XHTML</acronym>, <a href="http://www.w3.org/TR/xhtml1/#h-4.4" title="XHTML 1.0 Specification about quotes">quotes are mandatory</a>.</li>
    <li id="html-case">Element and attribute names should use a consistent case to enhance readability, preferred is <strong>lowercase</strong> for <acronym>XHTML</acronym> compability.</li>
    <li id="html-comments">Code should be well <code>&lt;!-- commented --></code> to help maintaining developers to get a fast grip of the basic structure and key concepts.</li>
    <li id="html-indention">Code should be consistently <strong>indented</strong>, tabs preferred over spaces.</li>
    <li id="html-alt">Images, image maps and scripted content must have an <a href="http://www.w3.org/TR/html4/struct/objects.html#adef-alt" title="HTML 4.01 specification about alternative text"><code>alt</code>-attribute</a> with an appropriate value.</li>
    <li id="html-width-height">Images should always <a href="http://www.w3.org/TR/html401/struct/objects.html#adef-width-IMG" title="HTML 4.01 specification about width and height">specify their <code>width</code> and <code>height</code></a> to allow browsers to continue rendering while waiting for the image data.</li>
    <li id="html-entities">Some special characters like <code>&amp;quot;</code>, <code>&amp;lt;</code>, <code>&amp;gt;</code>, and <a href="http://www.w3.org/TR/html401/appendix/notes.html#h-B.2.2" title="HTML 4.01 specification about ampersands in URI attribute values"><code>&amp;amp;</code></a> (especially within attributes like <code>href</code> or <code>src</code>) must always be replaced by their <strong>character entities</strong> or numeric character references (NCR). Also characters not included in the character set, like <code>&amp;euro;</code> in ISO 8859-1, must be replaced. The <acronym title="World Wide Web Consortium">W3C</acronym> <abbr title="Internationalization">I18N</abbr> activity group further <a href="http://www.w3.org/International/questions/qa-escapes" title="W3C: Using character entities and NCRs">recommends</a> to replace other special characters like <code>&amp;ndash;</code>, but <em>not</em> common characters like &ldquo;&uuml;&rdquo; in German texts or &ldquo;&eacute;&rdquo; in French to maintain code readability.</li>
    <li id="html-type"><code>script</code> and <code>style</code> tags must have a <a href="http://www.w3.org/TR/html401/interact/scripts.html#h-18.2.1" title="HTML 4.01 specification about the script type"><code>type</code></a> attribute.</li>
    <li id="html-js">
        <p><strong>JavaScript</strong> code should be included using <strong>external files</strong> for caching and better maintenance.</p>
        <p>Of course with <strong>Yahoo&rsquo;s performance research</strong> about <a href="http://yuiblog.com/blog/2007/01/04/performance-research-part-2/">browser cache</a> and <a href="http://yuiblog.com/blog/2006/11/28/performance-research-part-1/"><acronym>HTTP</acronym> requests</a> you could discuss if external files load faster with several server requests through <code>script src=&quot;foo.js&quot;</code> or just one request and internal <acronym>HTML</acronym> code, but either way you should use central, non-redundant files and include them in one way or another.</p>
    </li>
</ol>

<h3 id="css">Best practices in <acronym>CSS</acronym></h3>

<ol class="alpha">
    <li id="css-validation"><acronym>CSS</acronym> <a href="http://jigsaw.w3.org/css-validator/" title="External link to the World Wide Web Consortium&rsquo;s CSS validator">must validate</a>.</li>
    <li id="css-positioning">Elements should be <strong>positioned with <acronym>CSS</acronym>&nbsp;2</strong>, not tables.</li>
    <li id="css-decoration">All ornamental lines, borders, background colors and -images, underlines and other <strong>decorational elements</strong> should be rendered <strong>with <acronym>CSS</acronym>&nbsp;2</strong>.</li>
    <li id="css-formatting"><strong>Text</strong> should be <strong>formatted with <acronym>CSS</acronym>&nbsp;1</strong>, not with <code>font</code> tags.</li>
    <li id="css-external">All style sheets should be included in reusable, centrally maintainable, and cacheable <strong>external <acronym>CSS</acronym> files</strong>, not as redundant code within the <acronym>HTML</acronym> files.</li>
    <li id="css-mime-type">External <acronym>CSS</acronym> files should be sent with the <strong>correct MIME type</strong> (<code>text/css</code>).</li>
    <li id="css-naming-conventions"><strong><acronym>CSS</acronym> classes and IDs must be valid</strong>, <abbr title="that is">i.e.</abbr> <a href="http://www.w3.org/TR/html401/types.html#type-id">beginning with a letter</a>, not a number or an underscore. IDs must be unique. Their names should be <a href="http://www.w3.org/QA/Tips/goodclassnames" title="W3C Quality Assurance Tip: Use &quot;class&quot; with semantics in mind">generic</a>, describe functionality rather than appearance.</li>
</ol>

<h3 id="search-engines">Best practices for search engines</h3>

<ol class="alpha">
    <li id="se-title">Use a <strong>descriptive title</strong> with the name of the website and consistent separating characters in it.</li>
    <li id="se-keywords">Use <strong>keywords, keyphrases, and a description</strong> reflecting the page&rsquo;s content.</li>
    <li id="se-url-design">The <a href="http://www.w3.org/Provider/Style/URI" title="Tim Berners-Lee&rsquo;s article &ldquo;Cool URIs don&rsquo;t change&rdquo;"><acronym>URL</acronym> should be descriptive</a>, <a href="http://www.adaptivepath.com/publications/essays/archives/000058.php" title="Jesse James Garrett about &ldquo;User-Centered URL Design&rdquo;">human-readable</a>, easy to remember, to bookmark, and easy to spell on a phone. Don&rsquo;t bother the user with file extensions, thus you will be future compatible and independent from your current software.</li>
    <li id="se-robots-txt">Use the <a href="http://www.robotstxt.org">Robots Exclusion Standard</a>, <abbr>i.e.</abbr> <code>robots.txt</code>.</li>
    <li id="se-relevance">The <strong>content should be as high up</strong> in the code as possible as it gets more relevance there.</li>
    <li id="se-semantics">Use <strong>proper semantic code</strong>, like headlines, or list items for anything that resembles a list. Don&rsquo;t use list items to get bullet points or headlines to set bold text.</li>
    <li id="se-link">Use <a href="http://www.w3.org/TR/html401/types.html#type-links" title="HTML 4.01 specification about link types"><code>&lt;link&gt;</code> tags</a> to specify relations between pages, like <code>rel=&quot;start&quot;</code>, <code>chapter</code>, <code>prev</code>, or <code>next</code>, as search engines might value your start page more, or browsers could preload <code>next</code> pages.</li>
    <li id="se-favicon">Use a <a href="http://favicon.com">favorite icon</a> for bookmarking and to keep your error log clean.</li>
    <li id="se-pics">Use the <a href="http://www.w3.org/PICS/"><acronym title="Platform for Internet Content Selection">PICS</acronym></a> <a href="http://www.icra.org" title="Internet Content Rating Association, external link where you can label your website">standard</a> to signal search engines and filter programs that your website is safe for kids.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://learningtheworld.eu/2006/best-practices/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
	</channel>
</rss>
