<?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>indiWiz.com &#187; xhtml</title>
	<atom:link href="http://indiwiz.com/tag/xhtml/feed/" rel="self" type="application/rss+xml" />
	<link>http://indiwiz.com</link>
	<description>Subhash&#039;s Tech Log</description>
	<lastBuildDate>Wed, 03 Mar 2010 13:24:54 +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>Writing HTML</title>
		<link>http://indiwiz.com/2009/04/21/writing-html/</link>
		<comments>http://indiwiz.com/2009/04/21/writing-html/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 05:46:02 +0000</pubDate>
		<dc:creator>Subhash Chandran</dc:creator>
				<category><![CDATA[Software Dev]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://indiwiz.com/?p=248</guid>
		<description><![CDATA[Programmers are often required to write HTML code. Recently, on reviewing such code, I found some glaring mistakes. Based on this experience, I have assembled some points which programmers should note when developing HTML. Version of HTML Before writing HTML, decide upon version compliance. HTML 4.01 and XHTML 1.0 are popular choices. Specify Version of [...]]]></description>
			<content:encoded><![CDATA[<p>Programmers are often required to write HTML code. Recently, on reviewing such code, I found some glaring mistakes. Based on this experience, I have assembled some points which programmers should note when developing HTML.</p>
<h3>Version of HTML</h3>
<p>Before writing HTML, decide upon version compliance. HTML 4.01 and XHTML 1.0 are popular choices.</p>
<h3>Specify Version of HTML as DOCTYPE</h3>
<p>For HTML 4.01 it is:</p>
<pre class="brush: xml;">
&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot; &quot;http://www.w3.org/TR/html4/loose.dtd&quot;&gt;
</pre>
<p>For XHTML 1.0:</p>
<pre class="brush: xml;">
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
</pre>
<p>For a detailed list, visit: <a href="http://webdesign.about.com/od/xhtml/a/aa011507.htm">http://webdesign.about.com/od/xhtml/a/aa011507.htm</a></p>
<h3>Don&#8217;t use deprecated elements like &lt;font&gt;</h3>
<p>&lt;font&gt; has been deprecated since version 4.01 of HTML.</p>
<h3>Use CSS for styling</h3>
<p>For styling purposes (specifying font, color, background-color, border, etc.) use only CSS. For example, for setting the background of a page, the earlier method is:</p>
<pre class="brush: xml;">
&lt;body bgcolor=&quot;blue&quot;&gt;
</pre>
<p>This is better written as:</p>
<pre class="brush: xml;">
&lt;body style=&quot;background: blue;&quot;&gt;
</pre>
<h3>Open/Close Elements</h3>
<p>Please ensure you open and close the HTML elements in proper order. Always have the discipline of closing open elements.</p>
<h3>Indentation</h3>
<p>HTML is also source code which is maintained by humans. Please respect yourself and the people who will be maintaining it later: write readable HTML with proper indentation.</p>
<h3>Validate HTML</h3>
<p>Use a proper <a href="http://validator.w3.org/">validation service</a> before publishing your HTML. You may also use tools like <tt>xmllint</tt> also to validate your HTML.</p>
<h3>Test in target browser</h3>
<p>All our development systems are Linux. We developers test our HTMLs in Firefox. But our clients use IE. Situations like these demand additional testing effort in IE.</p>


<div class="shr-bookmarks shr-bookmarks-expand">
<ul class="socials">
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://indiwiz.com/2009/04/21/writing-html/&amp;title=Writing+HTML" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://indiwiz.com/2009/04/21/writing-html/&amp;title=Writing+HTML" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://indiwiz.com/2009/04/21/writing-html/&amp;title=Writing+HTML&amp;desc=Programmers%20are%20often%20required%20to%20write%20HTML%20code.%20Recently%2C%20on%20reviewing%20such%20code%2C%20I%20found%20some%20glaring%20mistakes.%20Based%20on%20this%20experience%2C%20I%20have%20assembled%20some%20points%20which%20programmers%20should%20note%20when%20developing%20HTML.%0A%0AVersion%20of%20HTML%0A%0ABefore%20writing%20HTML%2C%20decide%20upon%20version%20compliance.%20HTML%204" rel="nofollow" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://indiwiz.com/2009/04/21/writing-html/&amp;t=Writing+HTML" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://indiwiz.com/2009/04/21/writing-html/&amp;title=Writing+HTML&amp;summary=Programmers%20are%20often%20required%20to%20write%20HTML%20code.%20Recently%2C%20on%20reviewing%20such%20code%2C%20I%20found%20some%20glaring%20mistakes.%20Based%20on%20this%20experience%2C%20I%20have%20assembled%20some%20points%20which%20programmers%20should%20note%20when%20developing%20HTML.%0A%0AVersion%20of%20HTML%0A%0ABefore%20writing%20HTML%2C%20decide%20upon%20version%20compliance.%20HTML%204&amp;source=indiWiz.com" rel="nofollow" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://indiwiz.com/2009/04/21/writing-html/&amp;title=Writing+HTML" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://indiwiz.com/2009/04/21/writing-html/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Feature Request: Script Exclusion in HTML</title>
		<link>http://indiwiz.com/2009/01/05/feature-request-script-exclusion-in-html/</link>
		<comments>http://indiwiz.com/2009/01/05/feature-request-script-exclusion-in-html/#comments</comments>
		<pubDate>Mon, 05 Jan 2009 10:44:26 +0000</pubDate>
		<dc:creator>Subhash Chandran</dc:creator>
				<category><![CDATA[Innovation]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[xhtml]]></category>

		<guid isPermaLink="false">http://indiwiz.com/?p=135</guid>
		<description><![CDATA[I am working currently in a portal project. From various datasources we collect information and publish as portlets. The current UI scenario requires us to use JavaScript libraries like prototype.js and jQuery. In both these libraries, $() has different meaning. So when we tie a particular portlet&#8217;s UI to prototype.js, and another to jQuery, we [...]]]></description>
			<content:encoded><![CDATA[<p>I am working currently in a portal project. From various datasources we collect information and publish as portlets. The current UI scenario requires us to use JavaScript libraries like <a href="http://www.prototypejs.org/">prototype.js</a> and <a href="http://jquery.com/">jQuery</a>. In both these libraries, <tt>$()</tt> has different meaning. So when we tie a particular portlet&#8217;s UI to prototype.js, and another to jQuery, we cannot effectively place both of them in the same page.</p>
<p>If HTML/XHTML provides some kind of script exclusion so that scripts placed inside a particular scope do not reveal their functions and variables globally across the page, it is going to be helpful. For example:</p>
<pre>
&lt;script-package name=&quot;abc&quot;&gt;
  &lt;script src=&quot;prototype.js&quot; type=&quot;text/javascript&quot;/&gt;

  &lt;script type=&quot;text/javascript&quot;&gt;
    // use prototype specific code
  &lt;/script&gt;
&lt;/script-package&gt;

&lt;script-package name=&quot;xyz&quot;&gt;
  &lt;script src=&quot;jquery.js&quot; type=&quot;text/javascript&quot;/&gt;

  &lt;script type=&quot;text/javascript&quot;&gt;
    // use jQuery specific code
  &lt;/script&gt;
&lt;/script-package&gt;
</pre>
<p>In the rare case when a script needs to access some variable defined in different package, it can use some namespace mechanism. Any ideas?</p>


<div class="shr-bookmarks shr-bookmarks-expand">
<ul class="socials">
		<li class="shr-delicious">
			<a href="http://delicious.com/post?url=http://indiwiz.com/2009/01/05/feature-request-script-exclusion-in-html/&amp;title=Feature+Request%3A+Script+Exclusion+in+HTML" rel="nofollow" title="Share this on del.icio.us">Share this on del.icio.us</a>
		</li>
		<li class="shr-digg">
			<a href="http://digg.com/submit?phase=2&amp;url=http://indiwiz.com/2009/01/05/feature-request-script-exclusion-in-html/&amp;title=Feature+Request%3A+Script+Exclusion+in+HTML" rel="nofollow" title="Digg this!">Digg this!</a>
		</li>
		<li class="shr-diigo">
			<a href="http://www.diigo.com/post?url=http://indiwiz.com/2009/01/05/feature-request-script-exclusion-in-html/&amp;title=Feature+Request%3A+Script+Exclusion+in+HTML&amp;desc=I%20am%20working%20currently%20in%20a%20portal%20project.%20From%20various%20datasources%20we%20collect%20information%20and%20publish%20as%20portlets.%20The%20current%20UI%20scenario%20requires%20us%20to%20use%20JavaScript%20libraries%20like%20prototype.js%20and%20jQuery.%20In%20both%20these%20libraries%2C%20%24%28%29%20has%20different%20meaning.%20So%20when%20we%20tie%20a%20particular%20portlet%27s" rel="nofollow" title="Post this on Diigo">Post this on Diigo</a>
		</li>
		<li class="shr-facebook">
			<a href="http://www.facebook.com/share.php?v=4&amp;src=bm&amp;u=http://indiwiz.com/2009/01/05/feature-request-script-exclusion-in-html/&amp;t=Feature+Request%3A+Script+Exclusion+in+HTML" rel="nofollow" title="Share this on Facebook">Share this on Facebook</a>
		</li>
		<li class="shr-linkedin">
			<a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://indiwiz.com/2009/01/05/feature-request-script-exclusion-in-html/&amp;title=Feature+Request%3A+Script+Exclusion+in+HTML&amp;summary=I%20am%20working%20currently%20in%20a%20portal%20project.%20From%20various%20datasources%20we%20collect%20information%20and%20publish%20as%20portlets.%20The%20current%20UI%20scenario%20requires%20us%20to%20use%20JavaScript%20libraries%20like%20prototype.js%20and%20jQuery.%20In%20both%20these%20libraries%2C%20%24%28%29%20has%20different%20meaning.%20So%20when%20we%20tie%20a%20particular%20portlet%27s&amp;source=indiWiz.com" rel="nofollow" title="Share this on LinkedIn">Share this on LinkedIn</a>
		</li>
		<li class="shr-reddit">
			<a href="http://reddit.com/submit?url=http://indiwiz.com/2009/01/05/feature-request-script-exclusion-in-html/&amp;title=Feature+Request%3A+Script+Exclusion+in+HTML" rel="nofollow" title="Share this on Reddit">Share this on Reddit</a>
		</li>
</ul>
<div style="clear:both;"></div>
</div>

]]></content:encoded>
			<wfw:commentRss>http://indiwiz.com/2009/01/05/feature-request-script-exclusion-in-html/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
