<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>zParacha.com</title>
	
	<link>http://www.zparacha.com</link>
	<description>Effective programming and blogging tips by Zaheer Paracha</description>
	<lastBuildDate>Sun, 23 May 2010 00:41:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/zparacha" /><feedburner:info uri="zparacha" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:emailServiceId>zparacha</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Sort numbers in Java to find minimum and maximum values without using Array</title>
		<link>http://feedproxy.google.com/~r/zparacha/~3/W8FLUHaADN8/</link>
		<comments>http://www.zparacha.com/sort-numbers-in-java-find-minimum-and-maximum-values-without-using-array/#comments</comments>
		<pubDate>Sat, 22 May 2010 04:27:21 +0000</pubDate>
		<dc:creator>Zaheer Paracha</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.zparacha.com/?p=1274</guid>
		<description><![CDATA[Recently a reader contacted me with a question about sorting numbers in Java. After sorting the number the program then needs to print the largest and smallest values. I have written a post earlier that shows one way of finding largest and smallest numbers. That approach used Arrays but the<a href="http://www.zparacha.com/sort-numbers-in-java-find-minimum-and-maximum-values-without-using-array/"> Continue Reading <span style="font-size:1.35em;">&#187;</span></a><p><a href="http://www.zparacha.com/sort-numbers-in-java-find-minimum-and-maximum-values-without-using-array/">Sort numbers in Java to find minimum and maximum values without using Array</a> is a post from: <a href="http://www.zparacha.com">zParacha.com | Effective programming and blogging tips by Zaheer Paracha</a></p>



<span style="font-weight:bold;"> Related posts:</span><ul><li><a href='http://www.zparacha.com/minimum-maximum-array-value/' rel='bookmark' title='Permanent Link: Three ways to find minimum and maximum values in a Java array.'>Three ways to find minimum and maximum values in a Java array.</a> <small>In Java you can find maximum or minimum value in...</small></li>
<li><a href='http://www.zparacha.com/sort_numeric_arrays/' rel='bookmark' title='Permanent Link: Sort numbers in Javascript array'>Sort numbers in Javascript array</a> <small>Sorting an array in Javascript is a snap. You create...</small></li>
<li><a href='http://www.zparacha.com/how-to-convert-an-arraylist-to-array-in-java/' rel='bookmark' title='Permanent Link: How to convert an ArrayList to array in Java'>How to convert an ArrayList to array in Java</a> <small>Today, I will share a very basic Java program that...</small></li>
</ul>]]></description>
			<content:encoded><![CDATA[<div class="wpbuzzer_button" style="float: right"><a title="Post on Google Buzz" class="google-buzz-button" href="http://www.google.com/buzz/post" data-button-style="normal-count" data-url="http://www.zparacha.com/sort-numbers-in-java-find-minimum-and-maximum-values-without-using-array/" data-imageurl=""></a><script type="text/javascript" src="http://www.google.com/buzz/api/button.js"></script></div><p><!--adsense#greyLeft--><br />
Recently a reader contacted me with a question about sorting numbers in Java. After sorting the number the program then needs to print the largest and smallest values.  I have written a <a href="http://www.zparacha.com/minimum-maximum-array-value/"> post </a> earlier that shows one way of finding largest and smallest numbers. That approach used Arrays but the reader wanted to find largest and smallest values from a group of numbers without using Arrays. So here is another approach. </p>
<p>This program accepts input from the user and then prints out the largest and smallest numbers. </p>
<pre><code>

import java.util.*;
public class NumberSorter{
	public static void main(String args[]){
	  double a, b, c, x, y;
	  Scanner console = new Scanner(System.in);
	  System.out.print("Enter the first number: " );
	  a = console.nextDouble() ;
	  System.out.print("Enter the second number: " );
	  b  = console.nextDouble() ;
	  System.out.print("Enter the third number: " );
	  c = console.nextDouble();
	  x= Math.min(a, Math.min(b, c));
	  y= Math.max(a, Math.max(b, c));
	  System.out.println("\n" +x + " is the smallest number.\n" + y
	                     +" is the largest number.");
	}
}

</code></pre>
<p>Hope you find this useful. Share your ideas on how else can we find largest and smallest values from a group of numbers Java.
<div class="tweetmeme_button" style="float:right; margin: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.zparacha.com%2Fsort-numbers-in-java-find-minimum-and-maximum-values-without-using-array%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.zparacha.com%2Fsort-numbers-in-java-find-minimum-and-maximum-values-without-using-array%2F&amp;source=zparacha&amp;style=normal&amp;service=bit.ly" height="61" width="50" title="Sort numbers in Java to find minimum and maximum values without using Array" alt=" Sort numbers in Java to find minimum and maximum values without using Array" /><br />
			</a>
		</div>
<p><a href="http://www.zparacha.com/sort-numbers-in-java-find-minimum-and-maximum-values-without-using-array/">Sort numbers in Java to find minimum and maximum values without using Array</a> is a post from: <a href="http://www.zparacha.com">zParacha.com | Effective programming and blogging tips by Zaheer Paracha</a></p>
<img src="http://www.zparacha.com/?ak_action=api_record_view&id=1274&type=feed" alt=" Sort numbers in Java to find minimum and maximum values without using Array"  title="Sort numbers in Java to find minimum and maximum values without using Array" />

<p><span style="font-weight:bold;"> Related posts:</span><ul><li><a href='http://www.zparacha.com/minimum-maximum-array-value/' rel='bookmark' title='Permanent Link: Three ways to find minimum and maximum values in a Java array.'>Three ways to find minimum and maximum values in a Java array.</a> <small>In Java you can find maximum or minimum value in...</small></li>
<li><a href='http://www.zparacha.com/sort_numeric_arrays/' rel='bookmark' title='Permanent Link: Sort numbers in Javascript array'>Sort numbers in Javascript array</a> <small>Sorting an array in Javascript is a snap. You create...</small></li>
<li><a href='http://www.zparacha.com/how-to-convert-an-arraylist-to-array-in-java/' rel='bookmark' title='Permanent Link: How to convert an ArrayList to array in Java'>How to convert an ArrayList to array in Java</a> <small>Today, I will share a very basic Java program that...</small></li>
</ul></p>
<p><a href="http://feedads.g.doubleclick.net/~a/CCqWj3PhcscU4O7EagJVVr7oxOk/0/da"><img src="http://feedads.g.doubleclick.net/~a/CCqWj3PhcscU4O7EagJVVr7oxOk/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/CCqWj3PhcscU4O7EagJVVr7oxOk/1/da"><img src="http://feedads.g.doubleclick.net/~a/CCqWj3PhcscU4O7EagJVVr7oxOk/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/zparacha?a=W8FLUHaADN8:aj0q9Rks6QA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/zparacha?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zparacha?a=W8FLUHaADN8:aj0q9Rks6QA:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/zparacha?i=W8FLUHaADN8:aj0q9Rks6QA:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zparacha?a=W8FLUHaADN8:aj0q9Rks6QA:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/zparacha?i=W8FLUHaADN8:aj0q9Rks6QA:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/zparacha/~4/W8FLUHaADN8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.zparacha.com/sort-numbers-in-java-find-minimum-and-maximum-values-without-using-array/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.zparacha.com/sort-numbers-in-java-find-minimum-and-maximum-values-without-using-array/</feedburner:origLink></item>
		<item>
		<title>Java String comparison. The difference between == and equals().</title>
		<link>http://feedproxy.google.com/~r/zparacha/~3/GmLt8pqk2u4/</link>
		<comments>http://www.zparacha.com/java-string-comparison/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 06:02:54 +0000</pubDate>
		<dc:creator>Zaheer Paracha</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[String]]></category>

		<guid isPermaLink="false">http://www.zparacha.com/?p=1250</guid>
		<description><![CDATA[Many Java beginners find it difficult to differentiate between == operator and the &#8220;equals()&#8221; method when comparing String variables in Java. They assume that both operations perform the same function and either one can be used to compare two string variables. I have even seen many experienced programmers committing the<a href="http://www.zparacha.com/java-string-comparison/"> Continue Reading <span style="font-size:1.35em;">&#187;</span></a><p><a href="http://www.zparacha.com/java-string-comparison/">Java String comparison. The difference between == and equals().</a> is a post from: <a href="http://www.zparacha.com">zParacha.com | Effective programming and blogging tips by Zaheer Paracha</a></p>



<span style="font-weight:bold;"> Related posts:</span><ul><li><a href='http://www.zparacha.com/best-way-to-check-if-a-java-string-is-a-number/' rel='bookmark' title='Permanent Link: Best way to check if a Java String is a number.'>Best way to check if a Java String is a number.</a> <small>An example on how to validate if a String variable...</small></li>
<li><a href='http://www.zparacha.com/extract-substring-from-end-of-a-java-string/' rel='bookmark' title='Permanent Link: Extract substring from end of a Java String'>Extract substring from end of a Java String</a> <small>Today I&#8217;ll show you how to extract last few characters...</small></li>
<li><a href='http://www.zparacha.com/search-string-file-java-regular-expression/' rel='bookmark' title='Permanent Link: How to search for a string in a file using Java regular expression.'>How to search for a string in a file using Java regular expression.</a> <small>If you need to search for a phrase or a...</small></li>
</ul>]]></description>
			<content:encoded><![CDATA[<div class="wpbuzzer_button" style="float: right"><a title="Post on Google Buzz" class="google-buzz-button" href="http://www.google.com/buzz/post" data-button-style="normal-count" data-url="http://www.zparacha.com/java-string-comparison/" data-imageurl=""></a><script type="text/javascript" src="http://www.google.com/buzz/api/button.js"></script></div><p><a href="http://www.zparacha.com/java-string-comparison/javastring-2/" rel="attachment wp-att-1266"><img src="http://www.zparacha.com/wp-content/uploads/2010/02/javaString1-300x297.jpg" alt="javaString1 300x297 Java String comparison. The difference between == and equals()." title="javaString" width="300" height="297" class="alignleft size-medium wp-image-1266" /></a>Many Java beginners find it difficult to differentiate between == operator and the &#8220;equals()&#8221; method when comparing String variables in Java. They assume that both operations perform the same function and either one can be used to compare two string variables. I have even seen many experienced programmers committing the mistake of using &#8220;==&#8221; to compare the values of two strings.</p>
<p>So what is the difference between &#8220;==&#8221; and &#8220;equals()&#8221; and what is the correct method of comparing two string variables?<br />
<span id="more-1250"></span></p>
<h2> The == operator:</h2>
<p> The &#8220;<strong>==</strong>&#8221; operator compares the references of two objects in memory. It returns true if both objects point to exact same location in memory. Remember that Strings are immutable in Java, so if you have a String variable <em>str1 </em>with a value of &#8220;abc&#8221; and then you create another variable <em>str2 </em>with value &#8220;abc&#8221;, rather than creating a new String variable with same value, Java will simply point <em>str2 </em>to same memory location that holds the value for <em>str1</em>.</p>
<p>In this scenario <strong>str1==str2</strong> will return <em>true </em>because both <em>str1 </em>and str2 are referencing the same object in memory.</p>
<p>However, if you create a new variable using the String constructor, like String str3=new String(&#8220;abc&#8221;); Java will allocate new memory space for str3. Now although str1 and str3 have exact same value, str1==str3 will return false because they are two distinct objects in the memory.</p>
<p><!--adsense#greyLeft--></p>
<h2>The equals() method:</h2>
<p> The <em><strong>equals </strong></em>method compare the text content  or the value of two string variables. If both variables have exact same value, equals() will return true, otherwise it will return false.<br />
So, str1.equals(str2) , str1.equals(str3), and  str2.equals(str3) will all return true.<br />
 str1.equals(&#8220;xyz&#8221;) will return false.</p>
<p> Here is an example to help you understand the difference between &#8220;==&#8221; and equals().</p>
<pre><code>
public class StringComparison{
	public static void main(String args[]){
		String str1 =  new String("abc");
		String str2 =  new String ("abc");
		if(str1==str2){
			System.out.println("str1==str2 is true");
		}else{
			System.out.println("str1==str2 is false");
		}

		if(str1.equals(str2)){
			System.out.println("str1.equals(str2) is true");
		}else{
			System.out.println("str1.equals(str2) is false");
		}

		String str3="abc",
		str4 ="abc";
		if(str3==str4){
			System.out.println("str3==str4 is true");
		}else{
			System.out.println("str3==str4 is false");
		}
	}
}
</code> </pre>
<p> Here is the output from this program.</p>
<pre><code>
 str1==str2 is false
 str1.equals(str2) is true
 str3==str4 is true
 </code></pre>
<p>
 Most of the time you need to compare the values of the variable so you will need the equals() method. In situations where you need to check if two variables reference same memory location then you will use &#8220;==&#8221; operator.
 </p>
<p> I hope this will help you understand when to use &#8220;==&#8221; or equals() for Java string comparison.</p>
<p><span style="font-size:11px;">Image credit: <a href="http://www.flickr.com/photos/nivuniconnu/">Martyne</a></span>
<div class="tweetmeme_button" style="float:right; margin: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.zparacha.com%2Fjava-string-comparison%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.zparacha.com%2Fjava-string-comparison%2F&amp;source=zparacha&amp;style=normal&amp;service=bit.ly" height="61" width="50" title="Java String comparison. The difference between == and equals()." alt=" Java String comparison. The difference between == and equals()." /><br />
			</a>
		</div>
<p><a href="http://www.zparacha.com/java-string-comparison/">Java String comparison. The difference between == and equals().</a> is a post from: <a href="http://www.zparacha.com">zParacha.com | Effective programming and blogging tips by Zaheer Paracha</a></p>
<img src="http://www.zparacha.com/?ak_action=api_record_view&id=1250&type=feed" alt=" Java String comparison. The difference between == and equals()."  title="Java String comparison. The difference between == and equals()." />

<p><span style="font-weight:bold;"> Related posts:</span><ul><li><a href='http://www.zparacha.com/best-way-to-check-if-a-java-string-is-a-number/' rel='bookmark' title='Permanent Link: Best way to check if a Java String is a number.'>Best way to check if a Java String is a number.</a> <small>An example on how to validate if a String variable...</small></li>
<li><a href='http://www.zparacha.com/extract-substring-from-end-of-a-java-string/' rel='bookmark' title='Permanent Link: Extract substring from end of a Java String'>Extract substring from end of a Java String</a> <small>Today I&#8217;ll show you how to extract last few characters...</small></li>
<li><a href='http://www.zparacha.com/search-string-file-java-regular-expression/' rel='bookmark' title='Permanent Link: How to search for a string in a file using Java regular expression.'>How to search for a string in a file using Java regular expression.</a> <small>If you need to search for a phrase or a...</small></li>
</ul></p>
<p><a href="http://feedads.g.doubleclick.net/~a/vDXNwQhSNQGr0LC_YdOVFAwttEo/0/da"><img src="http://feedads.g.doubleclick.net/~a/vDXNwQhSNQGr0LC_YdOVFAwttEo/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/vDXNwQhSNQGr0LC_YdOVFAwttEo/1/da"><img src="http://feedads.g.doubleclick.net/~a/vDXNwQhSNQGr0LC_YdOVFAwttEo/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/zparacha?a=GmLt8pqk2u4:lWeFRLSS6PI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/zparacha?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zparacha?a=GmLt8pqk2u4:lWeFRLSS6PI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/zparacha?i=GmLt8pqk2u4:lWeFRLSS6PI:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zparacha?a=GmLt8pqk2u4:lWeFRLSS6PI:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/zparacha?i=GmLt8pqk2u4:lWeFRLSS6PI:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/zparacha/~4/GmLt8pqk2u4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.zparacha.com/java-string-comparison/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://www.zparacha.com/java-string-comparison/</feedburner:origLink></item>
		<item>
		<title>An HTML element you don't want to omit.</title>
		<link>http://feedproxy.google.com/~r/zparacha/~3/wxpWRkDlE5A/</link>
		<comments>http://www.zparacha.com/doctype-explained/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 04:57:51 +0000</pubDate>
		<dc:creator>Zaheer Paracha</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[doctype]]></category>
		<category><![CDATA[html]]></category>

		<guid isPermaLink="false">http://www.zparacha.com/?p=1203</guid>
		<description><![CDATA[As web developers we have the tendency to blame web browsers for inconsistencies and for not displaying the pages as designed. Most of the time the blame is justified, but there are instances when the blame lies at the feet of the web developers. For example, incorrect CSS declarations, missing<a href="http://www.zparacha.com/doctype-explained/"> Continue Reading <span style="font-size:1.35em;">&#187;</span></a><p><a href="http://www.zparacha.com/doctype-explained/">An HTML element you don&#39;t want to omit.</a> is a post from: <a href="http://www.zparacha.com">zParacha.com | Effective programming and blogging tips by Zaheer Paracha</a></p>



<span style="font-weight:bold;"> Related posts:</span><ul><li><a href='http://www.zparacha.com/how-to-position-html-element-in-the-center-using-css/' rel='bookmark' title='Permanent Link: How to position HTML element in the center using CSS.'>How to position HTML element in the center using CSS.</a> <small>Positioning text in the center of an element is easily...</small></li>
<li><a href='http://www.zparacha.com/encode-decode-html-entities/' rel='bookmark' title='Permanent Link: Encode / Decode HTML Entities'>Encode / Decode HTML Entities</a> <small>Image credit:lloydi Have you been typing HTML entities by hand...</small></li>
<li><a href='http://www.zparacha.com/textfield_focus/' rel='bookmark' title='Permanent Link: Set focus on the first text field of HTML form.'>Set focus on the first text field of HTML form.</a> <small>A HTML form is a very good channel that you...</small></li>
</ul>]]></description>
			<content:encoded><![CDATA[<div class="wpbuzzer_button" style="float: right"><a title="Post on Google Buzz" class="google-buzz-button" href="http://www.google.com/buzz/post" data-button-style="normal-count" data-url="http://www.zparacha.com/doctype-explained/" data-imageurl=""></a><script type="text/javascript" src="http://www.google.com/buzz/api/button.js"></script></div><p><div id="attachment_1222" class="wp-caption alignleft" style="width: 210px"><a href="http://www.zparacha.com/doctype-explained/doctypes/" rel="attachment wp-att-1222"><img src="http://www.zparacha.com/wp-content/uploads/2010/02/doctypes.gif" alt="Various Doctypes" title="doctypes" width="200" height="228" class="size-full wp-image-1222" /></a><p class="wp-caption-text">Doctypes</p></div>As web developers we have the tendency to blame web browsers for inconsistencies and for not displaying the pages as designed. Most of the time the blame is justified,  but there are instances when the blame lies at the feet of the web developers.  For example, incorrect CSS declarations, missing closing tags in HTML documents will break you website. Another common and often overlooked reason of broken web pages is the missing or incorrect DOCYTYPE declaration. <span id="more-1203"></span></p>
<p>  If your website is not rendered properly by some browsers,  the first thing you need to check is the first line in your HTML document. <!--more--></p>
<p>The first line of every HTML document should have a valid DOCTYPE declaration. A missing or invalid DOCTYPE sends browsers in to the quirks mode and then the web browser uses its own methods to parse and render your page.</p>
<h2>What is DOCTYPE?</h2>
<p>A <strong>Document Type Declaration (DOCTYPE)</strong> informs the browsers which version of (X)HTML your web page is using. Browsers use this information to validate and render your documents. All compliant web pages must begin with a valid DOCTYPE declaration. If you don&#8217;t include a DOCTYPE declaration or if it is not valid, your web pages will not be validated and the web browser won&#8217;t be able to render your web pages properly.</p>
<h2>Why DOCTYPE is important?</h2>
<p>All standard-compliant browser need some information about the page to validate its content and then display it properly. There are several versions of HTML and XHTML and browsers need to know the version you are using.<br />
A DOCTYPE tells browsers which (X)HTML version you are using and help them to render your page in standards–compliant mode. This will ensure that your pages are displayed by all browsers like you want them.</p>
<p>[ad#GreyLeft]But if you don&#8217;t include the DOCTYPE or if your DOCTYPE declaration is invalid, most browsers will assume that you are using an older version HTML and your page does not meet latest standards. The browser will then try to parse and render your page in backward compatible fashion (known as quirks mode) and may use browser-specific DOM.<br />
Of course, you don&#8217;t want this. So save yourself some time and frustration by adding one of the following DOCTYPES in all your HTML page.</p>
<table  style="background:none repeat scroll 0 0 #FFFFBE;border:1px solid #333;margin-bottom:2em;font-size: 0.9em;">
<tbody>
<tr style="font-size:1.0em;background:#eee;color:#000;">
<th>Version</th>
<th>DTD list</th>
<th>DOCTYPE Declaration in documents</th>
</tr>
<tr>
<td class="html"><a href="http://www.w3.org/TR/html401/">HTML&nbsp;4.01</a></td>
<td class="dtd"><a href="http://www.w3.org/TR/html401/strict.dtd">Strict</a>, <a href="http://www.w3.org/TR/html401/loose.dtd">Transitional</a>, <a href="http://www.w3.org/TR/html401/frameset.dtd">Frameset</a></td>
<td class="htmlcmt">
<pre>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd"&gt;
&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd"&gt;
&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
   "http://www.w3.org/TR/html4/frameset.dtd"&gt;
	</pre>
</td>
</tr>
<tr>
<td class="html"><a href="http://www.w3.org/TR/xhtml1/">XHTML&nbsp;1.0</a></td>
<td class="dtd"><a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" class="broken_link">Strict</a>, <a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" class="broken_link">Transitional</a>, <a href="http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">Frameset</a></td>
<td class="htmlcmt">
<pre>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"&gt;
	</pre>
</td>
</tr>
</tbody>
</table>
<p>I copied these DOCTYPE declarations from W3C website. You can find complete table of DOCTYPE declarations at <a href="http://www.w3.org/QA/2002/04/Web-Quality">http://www.w3.org/QA/2002/04/Web-Quality</a>.</p>
<p>This one line in all your HTML pages will make your relationship with browsers a little less stressful. My advise to all web developers, &#8220;Don&#8217;t publish a web page without DOCTYPE.&#8221;</p>
<div class="tweetmeme_button" style="float:right; margin: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.zparacha.com%2Fdoctype-explained%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.zparacha.com%2Fdoctype-explained%2F&amp;source=zparacha&amp;style=normal&amp;service=bit.ly" height="61" width="50" title="An HTML element you don&#39;t want to omit. " alt=" An HTML element you don&#39;t want to omit. " /><br />
			</a>
		</div>
<p><a href="http://www.zparacha.com/doctype-explained/">An HTML element you don&#39;t want to omit.</a> is a post from: <a href="http://www.zparacha.com">zParacha.com | Effective programming and blogging tips by Zaheer Paracha</a></p>
<img src="http://www.zparacha.com/?ak_action=api_record_view&id=1203&type=feed" alt=" An HTML element you don&#39;t want to omit. "  title="An HTML element you don&#39;t want to omit. " />

<p><span style="font-weight:bold;"> Related posts:</span><ul><li><a href='http://www.zparacha.com/how-to-position-html-element-in-the-center-using-css/' rel='bookmark' title='Permanent Link: How to position HTML element in the center using CSS.'>How to position HTML element in the center using CSS.</a> <small>Positioning text in the center of an element is easily...</small></li>
<li><a href='http://www.zparacha.com/encode-decode-html-entities/' rel='bookmark' title='Permanent Link: Encode / Decode HTML Entities'>Encode / Decode HTML Entities</a> <small>Image credit:lloydi Have you been typing HTML entities by hand...</small></li>
<li><a href='http://www.zparacha.com/textfield_focus/' rel='bookmark' title='Permanent Link: Set focus on the first text field of HTML form.'>Set focus on the first text field of HTML form.</a> <small>A HTML form is a very good channel that you...</small></li>
</ul></p>
<p><a href="http://feedads.g.doubleclick.net/~a/rILVhsh9Jsdyce6NWaby9fM-_lM/0/da"><img src="http://feedads.g.doubleclick.net/~a/rILVhsh9Jsdyce6NWaby9fM-_lM/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/rILVhsh9Jsdyce6NWaby9fM-_lM/1/da"><img src="http://feedads.g.doubleclick.net/~a/rILVhsh9Jsdyce6NWaby9fM-_lM/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/zparacha?a=wxpWRkDlE5A:bxO54Rgm0xI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/zparacha?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zparacha?a=wxpWRkDlE5A:bxO54Rgm0xI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/zparacha?i=wxpWRkDlE5A:bxO54Rgm0xI:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zparacha?a=wxpWRkDlE5A:bxO54Rgm0xI:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/zparacha?i=wxpWRkDlE5A:bxO54Rgm0xI:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/zparacha/~4/wxpWRkDlE5A" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.zparacha.com/doctype-explained/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.zparacha.com/doctype-explained/</feedburner:origLink></item>
		<item>
		<title>A fresh new look.</title>
		<link>http://feedproxy.google.com/~r/zparacha/~3/wJKtqUNqEAQ/</link>
		<comments>http://www.zparacha.com/a-fresh-new-look/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 04:48:10 +0000</pubDate>
		<dc:creator>Zaheer Paracha</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[theme]]></category>
		<category><![CDATA[thesis]]></category>

		<guid isPermaLink="false">http://www.zparacha.com/?p=1196</guid>
		<description><![CDATA[Welcome to redesigned and improved zParacha.com. I have been thinking of giving my blog a face-lift for some time. I considered several options including designing/developing a new theme from scratch, buying Thesis and then modifying it, or buying a premium theme. Since I have several options I kept considering pros<a href="http://www.zparacha.com/a-fresh-new-look/"> Continue Reading <span style="font-size:1.35em;">&#187;</span></a><p><a href="http://www.zparacha.com/a-fresh-new-look/">A fresh new look.</a> is a post from: <a href="http://www.zparacha.com">zParacha.com | Effective programming and blogging tips by Zaheer Paracha</a></p>



<span style="font-weight:bold;"> Related posts:</span><ul><li><a href='http://www.zparacha.com/auto-reply-to-new-twitter-followers/' rel='bookmark' title='Permanent Link: Send a thank you message to your new Twitter followers'>Send a thank you message to your new Twitter followers</a> <small>Have you ever wondered how when you “follow” certain Twitter...</small></li>
<li><a href='http://www.zparacha.com/best-twitter-tools/' rel='bookmark' title='Permanent Link: Best free tools for Twitter'>Best free tools for Twitter</a> <small>Twitter provides an excellent platform to bloggers to promote their...</small></li>
<li><a href='http://www.zparacha.com/publish-your-blog-posts-to-twitter-with-feedburne/' rel='bookmark' title='Permanent Link: Publish your blog posts to Twitter with Feedburner.'>Publish your blog posts to Twitter with Feedburner.</a> <small>One of earliest third party tools that I started using...</small></li>
</ul>]]></description>
			<content:encoded><![CDATA[<div class="wpbuzzer_button" style="float: right"><a title="Post on Google Buzz" class="google-buzz-button" href="http://www.google.com/buzz/post" data-button-style="normal-count" data-url="http://www.zparacha.com/a-fresh-new-look/" data-imageurl=""></a><script type="text/javascript" src="http://www.google.com/buzz/api/button.js"></script></div><p>Welcome to redesigned and improved zParacha.com. I have been thinking of giving my blog a face-lift for some time. I considered several options including designing/developing a new theme from scratch, buying <a href="http://www.zparacha.com/thesisRedir.php">Thesis</a> and then modifying it, or buying a premium theme. Since I have several options I kept considering pros and cons of each one and in the process the planned upgrade was delayed. Basically I was just procrastinating. </p>
<p>Finally, I decided to get it down and settled on this elegant, free premium theme. I am still working on some minor customization but I believe this is a nice, professional-looking theme that meets my requirements. </p>
<p>Share your thoughts on this new design. Do you like the color scheme, page layout? What do you not like? What elements do you think I can change to further improve the look?</p>
<div class="tweetmeme_button" style="float:right; margin: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.zparacha.com%2Fa-fresh-new-look%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.zparacha.com%2Fa-fresh-new-look%2F&amp;source=zparacha&amp;style=normal&amp;service=bit.ly" height="61" width="50" title="A fresh new look." alt=" A fresh new look." /><br />
			</a>
		</div>
<p><a href="http://www.zparacha.com/a-fresh-new-look/">A fresh new look.</a> is a post from: <a href="http://www.zparacha.com">zParacha.com | Effective programming and blogging tips by Zaheer Paracha</a></p>
<img src="http://www.zparacha.com/?ak_action=api_record_view&id=1196&type=feed" alt=" A fresh new look."  title="A fresh new look." />

<p><span style="font-weight:bold;"> Related posts:</span><ul><li><a href='http://www.zparacha.com/auto-reply-to-new-twitter-followers/' rel='bookmark' title='Permanent Link: Send a thank you message to your new Twitter followers'>Send a thank you message to your new Twitter followers</a> <small>Have you ever wondered how when you “follow” certain Twitter...</small></li>
<li><a href='http://www.zparacha.com/best-twitter-tools/' rel='bookmark' title='Permanent Link: Best free tools for Twitter'>Best free tools for Twitter</a> <small>Twitter provides an excellent platform to bloggers to promote their...</small></li>
<li><a href='http://www.zparacha.com/publish-your-blog-posts-to-twitter-with-feedburne/' rel='bookmark' title='Permanent Link: Publish your blog posts to Twitter with Feedburner.'>Publish your blog posts to Twitter with Feedburner.</a> <small>One of earliest third party tools that I started using...</small></li>
</ul></p>
<p><a href="http://feedads.g.doubleclick.net/~a/kFMeruqzVlbhkenQzibOEwpQ6ls/0/da"><img src="http://feedads.g.doubleclick.net/~a/kFMeruqzVlbhkenQzibOEwpQ6ls/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/kFMeruqzVlbhkenQzibOEwpQ6ls/1/da"><img src="http://feedads.g.doubleclick.net/~a/kFMeruqzVlbhkenQzibOEwpQ6ls/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/zparacha?a=wJKtqUNqEAQ:SkWmXNu3pIo:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/zparacha?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zparacha?a=wJKtqUNqEAQ:SkWmXNu3pIo:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/zparacha?i=wJKtqUNqEAQ:SkWmXNu3pIo:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zparacha?a=wJKtqUNqEAQ:SkWmXNu3pIo:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/zparacha?i=wJKtqUNqEAQ:SkWmXNu3pIo:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/zparacha/~4/wJKtqUNqEAQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.zparacha.com/a-fresh-new-look/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.zparacha.com/a-fresh-new-look/</feedburner:origLink></item>
		<item>
		<title>Why you should stop using onload method.</title>
		<link>http://feedproxy.google.com/~r/zparacha/~3/5EQMmdQSXmw/</link>
		<comments>http://www.zparacha.com/better-alternative-to-onload/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 03:46:27 +0000</pubDate>
		<dc:creator>Zaheer Paracha</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[focus]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[JS]]></category>
		<category><![CDATA[onload]]></category>

		<guid isPermaLink="false">http://www.zparacha.com/?p=1127</guid>
		<description><![CDATA[It is amazing that many web developers still use onload method embedded in the BODY tag, like &#60;HEAD&#62; &#60;BODY onload="document.contact.userID.focus();"&#62; &#60;form name="contact"&#62; &#60;input type="text" name="userID" &#62; &#60;/form&#62; &#60;/BODY&#62; &#60;/HEAD&#62; There are two problems with this line of code. Embedding code (behavior) with HTML (structure) makes it difficult to maintain the<a href="http://www.zparacha.com/better-alternative-to-onload/"> Continue Reading <span style="font-size:1.35em;">&#187;</span></a><p><a href="http://www.zparacha.com/better-alternative-to-onload/">Why you should stop using onload method.</a> is a post from: <a href="http://www.zparacha.com">zParacha.com | Effective programming and blogging tips by Zaheer Paracha</a></p>



<span style="font-weight:bold;"> Related posts:</span><ul><li><a href='http://www.zparacha.com/textfield_focus/' rel='bookmark' title='Permanent Link: Set focus on the first text field of HTML form.'>Set focus on the first text field of HTML form.</a> <small>A HTML form is a very good channel that you...</small></li>
<li><a href='http://www.zparacha.com/css-text-resize/' rel='bookmark' title='Permanent Link: Dynamically Resize Text'>Dynamically Resize Text</a> <small>.codeText{color:blue;font-weight:normal;width:100%;} .subhead{color:gray;font-weight:bold;text-decoration:underline;} CSS, combined with little JavaScript, offers great flexibility...</small></li>
<li><a href='http://www.zparacha.com/ajax-contact-from/' rel='bookmark' title='Permanent Link: AJAX Contact Form'>AJAX Contact Form</a> <small>Want to collect input from your web site&#8217;s visitors? Don&#8217;t...</small></li>
</ul>]]></description>
			<content:encoded><![CDATA[<div class="wpbuzzer_button" style="float: right"><a title="Post on Google Buzz" class="google-buzz-button" href="http://www.google.com/buzz/post" data-button-style="normal-count" data-url="http://www.zparacha.com/better-alternative-to-onload/" data-imageurl=""></a><script type="text/javascript" src="http://www.google.com/buzz/api/button.js"></script></div><div id="attachment_1152" class="wp-caption alignleft" style="width: 286px"><a href="http://www.zparacha.com/better-alternative-to-onload/onload-2/" rel="attachment wp-att-1152"><img src="http://www.zparacha.com/wp-content/uploads/2010/02/onload1-276x300.png" alt="Onload " title="onload" width="276" height="300" class="size-medium wp-image-1152" /></a><p class="wp-caption-text">Onload</p></div>
<p>It is amazing that many web developers still use onload method embedded in the BODY tag, like</p>
<pre><code>
 &lt;HEAD&gt;
 &lt;BODY onload="document.contact.userID.focus();"&gt;
  &lt;form name="contact"&gt;
   &lt;input type="text" name="userID" &gt;
  &lt;/form&gt;
  &lt;/BODY&gt;
 &lt;/HEAD&gt;
</code></pre>
<p>There are two problems with this line of code. </p>
<ol>
<li>
Embedding code (behavior) with HTML (structure) makes it difficult to maintain the page.</li>
<li>onload() method will executes only after the page is fully displayed.</li>
</ul>
<p>Let&#8217;s see how to fix these problems.<span id="more-1127"></span><br />
Fixing problem # is quite simple. Just move your JavaScript code to the header section of you HTML page.</p>
<pre><code>
&lt;HTML&gt;
&lt;HEAD&gt;
&lt;script language="javascript"&gt;
function setFocus(){
	document.contact.userID.focus();
}
&lt;/script&gt;
&lt;/HEAD&gt;
&lt;BODY onload="setFocus();"&gt;
&lt;form name="contact"&gt;
&lt;input type="text" name="userID" &gt;
&lt;/form&gt;
&lt;/BODY>
&lt;/HTML&gt;
</pre>
<p></code></p>
<p>Even better approach would be to move the code to an external Javascript file and add a reference to that file in the header section of the HTML document. For example, if the code is in script.js you can import the code like</p>
<pre><code>
&lt;HTML&gt;
&lt;HEAD&gt;&lt;script language="javascript" ref="scripts/script.js"&gt;
&lt;/HEAD&gt;
&lt;BODY onload="setFocus();"&gt;
&lt;form name="contact"&gt;
&lt;input type="text" name="userID" &gt;
&lt;/form&gt;
&lt;/BODY>&lt;
/HTML&gt;
</code></pre>
<p><!--adsense#greyLeft--></p>
<p>This approach will make your HTML code clutter-free and the code will be more manageable. But this does not address the fact the there is a delay in the exectuion of the code. onload method executes after the page is completely loaded.  For instance, if you want to set focus to a text field on your web page using onload method, the foucs will be set after the page is completly downloaded.</p>
<p>If your web page is a simple text page with no images or multimedia elements then using onload might be OK. However, nowadays almost all web pages have at least few images, some even have embedded audio, video, Flash or other rich multimedia resources. These large resources take considerably long time to be fully loaded. And until all the content of the page is fully downloaded and the DOM tree is constructed, onload will not be fired. </p>
<h3>Set focus to the text field without onload:</h3>
<p>There is nothing wrong with the onload method, the problem is the large size of page elements that need to be downloaded by the browser. The browser needs to construct the DOM tree, load all the images and other multi-media resources and when everything is done then it will execute the onload method. A DOM tree is constructed instantly by the browser, but the large size of other elements take a while to be fully loaded. It means these external multilmedia files keep browser from executing the code triggred my onload event. The best approach would be to wait just long enough to let browser contstuct the DOM tree and then execute your code without waiting for all the objects to be completely downloaded. This can be done by using jQuery's <b>ready()</b> function.</p>
<pre><code>
  &lt;script type="text/javascript" src="scripts/jquery-1.3.2.min.js"&gt;
  &lt;/script&gt;
    &lt;script type="text/javascript"&gt;
      jQuery(document).ready(function() {
        document.contact.userID.focus();
      });
    &lt;/script&gt;
</code></pre>
<p>or more formally.</p>
<pre><code>
$(function(){
	document.contact.userID.focus();
}
</code></pre>
<p>So now your HTML code will be like</p>
<pre><code>
 &lt;HTML&gt;
 &lt;HEAD&gt;
  &lt;script type="text/javascript" src="scripts/jquery-1.3.2.min.js"&gt;
  &lt;/script&gt;
    &lt;script type="text/javascript"&gt;
      jQuery(document).ready(function() {
        document.contact.userID.focus();
      });
    &lt;/script&gt;
 &lt;/HEAD&gt;
 &lt;BODY &gt;
 &lt;form name="contact"&gt;
 &lt;input type="text" name="userID" &gt;
 &lt;/form&gt;
 &lt;/BODY>
 &lt;/HTML&gt;
</pre>
<p></code></p>
<p>Now our JavaScript code will be executed as soon as the DOM is fully constructed, without waiting for images and other multimedia resources. In this example the focus will be set to your input text field almost instantly and user can start typing in the information without waiting for rest of the page to be downloaded. This is a simple but effective way of improving your website's usability. </p>
<p><!--adsense#tla-->
<div class="tweetmeme_button" style="float:right; margin: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.zparacha.com%2Fbetter-alternative-to-onload%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.zparacha.com%2Fbetter-alternative-to-onload%2F&amp;source=zparacha&amp;style=normal&amp;service=bit.ly" height="61" width="50" title="Why you should stop using onload method." alt=" Why you should stop using onload method." /><br />
			</a>
		</div>
<p><a href="http://www.zparacha.com/better-alternative-to-onload/">Why you should stop using onload method.</a> is a post from: <a href="http://www.zparacha.com">zParacha.com | Effective programming and blogging tips by Zaheer Paracha</a></p>
<img src="http://www.zparacha.com/?ak_action=api_record_view&id=1127&type=feed" alt=" Why you should stop using onload method."  title="Why you should stop using onload method." />

<p><span style="font-weight:bold;"> Related posts:</span><ul><li><a href='http://www.zparacha.com/textfield_focus/' rel='bookmark' title='Permanent Link: Set focus on the first text field of HTML form.'>Set focus on the first text field of HTML form.</a> <small>A HTML form is a very good channel that you...</small></li>
<li><a href='http://www.zparacha.com/css-text-resize/' rel='bookmark' title='Permanent Link: Dynamically Resize Text'>Dynamically Resize Text</a> <small>.codeText{color:blue;font-weight:normal;width:100%;} .subhead{color:gray;font-weight:bold;text-decoration:underline;} CSS, combined with little JavaScript, offers great flexibility...</small></li>
<li><a href='http://www.zparacha.com/ajax-contact-from/' rel='bookmark' title='Permanent Link: AJAX Contact Form'>AJAX Contact Form</a> <small>Want to collect input from your web site&#8217;s visitors? Don&#8217;t...</small></li>
</ul></p>
<p><a href="http://feedads.g.doubleclick.net/~a/xkg7IcA4RY-f10lqM4LpMn6Cu40/0/da"><img src="http://feedads.g.doubleclick.net/~a/xkg7IcA4RY-f10lqM4LpMn6Cu40/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/xkg7IcA4RY-f10lqM4LpMn6Cu40/1/da"><img src="http://feedads.g.doubleclick.net/~a/xkg7IcA4RY-f10lqM4LpMn6Cu40/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/zparacha?a=5EQMmdQSXmw:yfRQwdzSv3Y:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/zparacha?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zparacha?a=5EQMmdQSXmw:yfRQwdzSv3Y:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/zparacha?i=5EQMmdQSXmw:yfRQwdzSv3Y:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zparacha?a=5EQMmdQSXmw:yfRQwdzSv3Y:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/zparacha?i=5EQMmdQSXmw:yfRQwdzSv3Y:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/zparacha/~4/5EQMmdQSXmw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.zparacha.com/better-alternative-to-onload/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.zparacha.com/better-alternative-to-onload/</feedburner:origLink></item>
		<item>
		<title>Google says Adios to IE6.</title>
		<link>http://feedproxy.google.com/~r/zparacha/~3/yyfx-kHDzio/</link>
		<comments>http://www.zparacha.com/google-says-goodbye-to-ie6/#comments</comments>
		<pubDate>Sat, 30 Jan 2010 17:31:31 +0000</pubDate>
		<dc:creator>Zaheer Paracha</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[browsers]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[IE6]]></category>

		<guid isPermaLink="false">http://www.zparacha.com/?p=1119</guid>
		<description><![CDATA[Google agrees that the time has come for us to lay IE6 to rest. Google announced in a blog post that it will stop supporting IE6 from March 01, 2010. Google will start by phasing out IE6 support for Google Docs and Google Sites, but I believe eventually all Google<a href="http://www.zparacha.com/google-says-goodbye-to-ie6/"> Continue Reading <span style="font-size:1.35em;">&#187;</span></a><p><a href="http://www.zparacha.com/google-says-goodbye-to-ie6/">Google says Adios to IE6.</a> is a post from: <a href="http://www.zparacha.com">zParacha.com | Effective programming and blogging tips by Zaheer Paracha</a></p>



<span style="font-weight:bold;"> Related posts:</span><ul><li><a href='http://www.zparacha.com/how-to-incorporate-google-custom-search-engine-with-adsense-into-your-wordpress-blog/' rel='bookmark' title='Permanent Link: How to incorporate Google Custom Search engine with Adsense into your WordPress blog.'>How to incorporate Google Custom Search engine with Adsense into your WordPress blog.</a> <small>AdSense is by far the most popular and easy to...</small></li>
<li><a href='http://www.zparacha.com/publish-your-blog-posts-to-twitter-with-feedburne/' rel='bookmark' title='Permanent Link: Publish your blog posts to Twitter with Feedburner.'>Publish your blog posts to Twitter with Feedburner.</a> <small>One of earliest third party tools that I started using...</small></li>
<li><a href='http://www.zparacha.com/how-to-add-amazon-affiliate-links-to-your-posts-in-one-step/' rel='bookmark' title='Permanent Link: How to add Amazon affiliate links to your posts in one step.'>How to add Amazon affiliate links to your posts in one step.</a> <small>Amazon.com being the largest online retailer offers a variety of...</small></li>
</ul>]]></description>
			<content:encoded><![CDATA[<div class="wpbuzzer_button" style="float: right"><a title="Post on Google Buzz" class="google-buzz-button" href="http://www.google.com/buzz/post" data-button-style="normal-count" data-url="http://www.zparacha.com/google-says-goodbye-to-ie6/" data-imageurl=""></a><script type="text/javascript" src="http://www.google.com/buzz/api/button.js"></script></div><p><a style="float: left; padding: 0px 6px;" id="aptureLink_iCBn9NkIYk" href="http://www.ferdychristant.com/blog/resources/Errors/$FILE/ie6_die.jpg"><img title="ie6 die jpg" src="http://www.ferdychristant.com/blog/resources/Errors/$FILE/ie6_die.jpg" style="border: 0px none;" height="214px" width="300px" alt="ie6 die Google says Adios to IE6." /></a><br />
Google agrees that the time has come for us to lay IE6 to rest. Google <a href="http://googleenterprise.blogspot.com/2010/01/modern-browsers-for-modern-applications.html"> announced </a> in a blog post that it will stop supporting IE6 from March 01, 2010. Google will start by phasing out IE6 support for Google Docs and Google Sites, but I believe eventually all Google products will stop supporting IE6.<br />
<span id="more-1119"></span></p>
<p><!--adsense#tla--></p>
<p>From Google&#8217;s official blog:</p>
<blockquote><p>Many other companies have already stopped supporting older browsers like Internet Explorer 6.0 as well as browsers that are not supported by their own manufacturers. We’re also going to begin phasing out our support, starting with Google Docs and Google Sites. As a result you may find that from March 1 key functionality within these products &#8212; as well as new Docs and Sites features &#8212; won’t work properly in older browsers.</p></blockquote>
<p>Even Microsoft itself <a href="http://blogs.technet.com/srd/archive/2010/01/15/assessing-risk-of-ie-0day-vulnerability.aspx">recommends</a> users to stop using IE6. Many corporations have already stopped supporting or using IE6, with the addition of an Internet giant like Google I hope the drive to abandon the aging IE6 will get some momentum. Hopefully 2010 will be year where wen can move away from IE6.  That would be an awesome news for all web developers. </p>
<p>What are your thoughts on IE6?</p>
<p><!--adsense#tla--></p>
<div class="tweetmeme_button" style="float:right; margin: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.zparacha.com%2Fgoogle-says-goodbye-to-ie6%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.zparacha.com%2Fgoogle-says-goodbye-to-ie6%2F&amp;source=zparacha&amp;style=normal&amp;service=bit.ly" height="61" width="50" title="Google says Adios to IE6." alt=" Google says Adios to IE6." /><br />
			</a>
		</div>
<p><a href="http://www.zparacha.com/google-says-goodbye-to-ie6/">Google says Adios to IE6.</a> is a post from: <a href="http://www.zparacha.com">zParacha.com | Effective programming and blogging tips by Zaheer Paracha</a></p>
<img src="http://www.zparacha.com/?ak_action=api_record_view&id=1119&type=feed" alt=" Google says Adios to IE6."  title="Google says Adios to IE6." />

<p><span style="font-weight:bold;"> Related posts:</span><ul><li><a href='http://www.zparacha.com/how-to-incorporate-google-custom-search-engine-with-adsense-into-your-wordpress-blog/' rel='bookmark' title='Permanent Link: How to incorporate Google Custom Search engine with Adsense into your WordPress blog.'>How to incorporate Google Custom Search engine with Adsense into your WordPress blog.</a> <small>AdSense is by far the most popular and easy to...</small></li>
<li><a href='http://www.zparacha.com/publish-your-blog-posts-to-twitter-with-feedburne/' rel='bookmark' title='Permanent Link: Publish your blog posts to Twitter with Feedburner.'>Publish your blog posts to Twitter with Feedburner.</a> <small>One of earliest third party tools that I started using...</small></li>
<li><a href='http://www.zparacha.com/how-to-add-amazon-affiliate-links-to-your-posts-in-one-step/' rel='bookmark' title='Permanent Link: How to add Amazon affiliate links to your posts in one step.'>How to add Amazon affiliate links to your posts in one step.</a> <small>Amazon.com being the largest online retailer offers a variety of...</small></li>
</ul></p>
<p><a href="http://feedads.g.doubleclick.net/~a/aUcNdpGfYkpuqswYDP9G2cgqFDk/0/da"><img src="http://feedads.g.doubleclick.net/~a/aUcNdpGfYkpuqswYDP9G2cgqFDk/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/aUcNdpGfYkpuqswYDP9G2cgqFDk/1/da"><img src="http://feedads.g.doubleclick.net/~a/aUcNdpGfYkpuqswYDP9G2cgqFDk/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/zparacha?a=yyfx-kHDzio:aS1mf3d2KUI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/zparacha?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zparacha?a=yyfx-kHDzio:aS1mf3d2KUI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/zparacha?i=yyfx-kHDzio:aS1mf3d2KUI:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zparacha?a=yyfx-kHDzio:aS1mf3d2KUI:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/zparacha?i=yyfx-kHDzio:aS1mf3d2KUI:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/zparacha/~4/yyfx-kHDzio" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.zparacha.com/google-says-goodbye-to-ie6/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.zparacha.com/google-says-goodbye-to-ie6/</feedburner:origLink></item>
		<item>
		<title>Five free tools to choose perfect colors for your website.</title>
		<link>http://feedproxy.google.com/~r/zparacha/~3/7jOeW0OSWPc/</link>
		<comments>http://www.zparacha.com/free-color-tools-for-webdesigners/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 06:03:07 +0000</pubDate>
		<dc:creator>Zaheer Paracha</dc:creator>
				<category><![CDATA[Most Popular Posts]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[color wheel]]></category>
		<category><![CDATA[colorrotate]]></category>
		<category><![CDATA[colors]]></category>
		<category><![CDATA[colourlovers]]></category>
		<category><![CDATA[kuler]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[webdesign]]></category>

		<guid isPermaLink="false">http://www.zparacha.com/?p=1061</guid>
		<description><![CDATA[Color coordination plays a big role in the look and feel of a website. An appealing color scheme is an important prerequisite for eye catching web design. Dull or very sharp colors or mismatch colors will not only look ugly it may overshadow other nice elements of your website. Choosing<a href="http://www.zparacha.com/free-color-tools-for-webdesigners/"> Continue Reading <span style="font-size:1.35em;">&#187;</span></a><p><a href="http://www.zparacha.com/free-color-tools-for-webdesigners/">Five free tools to choose perfect colors for your website.</a> is a post from: <a href="http://www.zparacha.com">zParacha.com | Effective programming and blogging tips by Zaheer Paracha</a></p>



<span style="font-weight:bold;"> Related posts:</span><ul><li><a href='http://www.zparacha.com/best-twitter-tools/' rel='bookmark' title='Permanent Link: Best free tools for Twitter'>Best free tools for Twitter</a> <small>Twitter provides an excellent platform to bloggers to promote their...</small></li>
<li><a href='http://www.zparacha.com/css-color-chart/' rel='bookmark' title='Permanent Link: Colors by name with hex and RGB codes.'>Colors by name with hex and RGB codes.</a> <small>Today I stumbled upon a rather useful website. CSS Color...</small></li>
<li><a href='http://www.zparacha.com/top-10-tools-for-bloggers/' rel='bookmark' title='Permanent Link: Top 10 tools for bloggers.'>Top 10 tools for bloggers.</a> <small>If you are looking for ways to improve your blogging...</small></li>
</ul>]]></description>
			<content:encoded><![CDATA[<div class="wpbuzzer_button" style="float: right"><a title="Post on Google Buzz" class="google-buzz-button" href="http://www.google.com/buzz/post" data-button-style="normal-count" data-url="http://www.zparacha.com/free-color-tools-for-webdesigners/" data-imageurl=""></a><script type="text/javascript" src="http://www.google.com/buzz/api/button.js"></script></div><p><div id="attachment_1155" class="wp-caption alignleft" style="width: 310px"><a href="http://www.zparacha.com/free-color-tools-for-webdesigners/rainbow-colors/" rel="attachment wp-att-1155"><img src="http://www.zparacha.com/wp-content/uploads/2010/01/rainbow-colors-300x225.jpg" alt="rainbow colors 300x225 Five free tools to choose perfect colors for your website." title="rainbow-colors" width="300" height="225" class="size-medium wp-image-1155" /></a><p class="wp-caption-text">Rainbow colors</p></div><br />
Color coordination plays a big role in the look and feel of a website. An appealing color scheme is an important prerequisite for eye catching web design. Dull or very sharp colors or mismatch colors  will not only look ugly it may overshadow other nice elements of your website. Choosing vibrant, harmonious colors that are pleasant to eyes enhance the aesthetics appeal of a website. Following is a list of online resources you can use to construct the color schemes for your next web design project.<br />
<span id="more-1061"></span></p>
<p/>
<h4><a href="http://kuler.adobe.com/"> Kuler</a></h4>
<p><img src="http://www.zparacha.com/images/kuler.png" alt="Kuler screenshot" title="Five free tools to choose perfect colors for your website." /></p>
<p/>
Kuler is a featured-rich online color free tool from Adobe that you can use to create your color themes or browse through thousands of themes generated by community members. As a registered user you can save your themes and then view them in MyKuler. You can create themes using single color or by using color wheel.  You can also extract color scheme from your images, for that you can upload your images or import them from Flickr. Kuler is my favorite. </p>
<p/>
<h4><a href="http://www.colorotate.org/">ColorRotate:</a></h4>
<p><img src="http://www.zparacha.com/images/colorrotate.png" alt="ColorRotate" title="Five free tools to choose perfect colors for your website." />
<p/>
Like Adobe Kuler, Colorrotate is also a free, online tool to generate color templates, but this is a 3D tool. Its intuitive 3D interface is fun to use and it enables you to quickly see the multidimensional nature of your colors and the relationships between colors. You can use its drag-and-drop option to adjust hue, brightness, and saturation. You can load color themes from you images. It also has a vast collection of community generated themes that you can browse to get some inspiration. </p>
<p/>
<p><!--adsense#top--></p>
<h4><a href="http://colorschemedesigner.com">ColorSchemeDesinger</a></h4>
<p><img src="http://www.zparacha.com/images/colorscheme.png" alt="ColorSchemeDesinger" title="Five free tools to choose perfect colors for your website." /></p>
<p/>ColorSchemeDesigner is another free, online tool to generate color palettes.  Its unique, easy-to-use color theme creator packs many useful featuers. You can generate single monochromatic, complimentary, triad, tetrad, analogic, and accented analogic color palettes.  Not only you can create the color palette , you can also user their preview function to apply your palette to a dummy web page, to see how your colors will look on your website. This will definitely save many designers lot of time.<br />
Another great feature is the ability to export  your color palette as a Photoshop palette, HTML+CSS, XML, TXT, and GPL .<br />
This tool does not work in IE6.</p>
<p/>
<h4><a href="http://www.colourlovers.com/">ColourLovers</a></h4>
<p><img src="http://www.zparacha.com/images/colorlover.png" alt="ColorLovers" title="Five free tools to choose perfect colors for your website." /></p>
<p/>If you need color inspiration, you will love ColourLovers. Designers from all over the world share their creative ideas on this website. It has over 286,866 members and showcase more than 2,407,124 colors, 1,090,882 palettes and 732,299 patterns. You can create your own color palettes or just pick one from this enormous collection. </p>
<blockquote><p>
COLOURlovers  is a resource that monitors and influences color trends. COLOURlovers gives the people who use color &#8211; whether for ad campaigns, product design, or in architectural specification &#8211; a place to check out a world of color, compare color palettes, submit news and comments, and read color related articles and interviews.
</p></blockquote>
<p/>
<h4><a href="http://www.ficml.org/jemimap/style/color/wheel.html">4096 Color Wheel</a></h4>
<p><img src="http://www.zparacha.com/images/colorwheel.png" alt="Color Wheel" style="border:1px solid #333;" title="Five free tools to choose perfect colors for your website." /></p>
<p/>If you don&#8217;t want all the bells and whistles of above mentioned tools, you may want to try Color Wheel. This is a simple web-based tool to view and choose web-safe colors. It offers you a palette of seven colors, displayed on the left side of the screen. You can change these 7 colors one by one by clicking on a color wheel. It is a nice little tool to generate a color palette.  </p>
<p>What are your favorite tools for creating color schemes?</p>
<div class="tweetmeme_button" style="float:right; margin: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.zparacha.com%2Ffree-color-tools-for-webdesigners%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.zparacha.com%2Ffree-color-tools-for-webdesigners%2F&amp;source=zparacha&amp;style=normal&amp;service=bit.ly" height="61" width="50" title="Five free tools to choose perfect colors for your website." alt=" Five free tools to choose perfect colors for your website." /><br />
			</a>
		</div>
<p><a href="http://www.zparacha.com/free-color-tools-for-webdesigners/">Five free tools to choose perfect colors for your website.</a> is a post from: <a href="http://www.zparacha.com">zParacha.com | Effective programming and blogging tips by Zaheer Paracha</a></p>
<img src="http://www.zparacha.com/?ak_action=api_record_view&id=1061&type=feed" alt=" Five free tools to choose perfect colors for your website."  title="Five free tools to choose perfect colors for your website." />

<p><span style="font-weight:bold;"> Related posts:</span><ul><li><a href='http://www.zparacha.com/best-twitter-tools/' rel='bookmark' title='Permanent Link: Best free tools for Twitter'>Best free tools for Twitter</a> <small>Twitter provides an excellent platform to bloggers to promote their...</small></li>
<li><a href='http://www.zparacha.com/css-color-chart/' rel='bookmark' title='Permanent Link: Colors by name with hex and RGB codes.'>Colors by name with hex and RGB codes.</a> <small>Today I stumbled upon a rather useful website. CSS Color...</small></li>
<li><a href='http://www.zparacha.com/top-10-tools-for-bloggers/' rel='bookmark' title='Permanent Link: Top 10 tools for bloggers.'>Top 10 tools for bloggers.</a> <small>If you are looking for ways to improve your blogging...</small></li>
</ul></p>
<p><a href="http://feedads.g.doubleclick.net/~a/UFN2_qCcW-ijx3CgD0vF975gdAw/0/da"><img src="http://feedads.g.doubleclick.net/~a/UFN2_qCcW-ijx3CgD0vF975gdAw/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/UFN2_qCcW-ijx3CgD0vF975gdAw/1/da"><img src="http://feedads.g.doubleclick.net/~a/UFN2_qCcW-ijx3CgD0vF975gdAw/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/zparacha?a=7jOeW0OSWPc:us3mEn50q30:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/zparacha?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zparacha?a=7jOeW0OSWPc:us3mEn50q30:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/zparacha?i=7jOeW0OSWPc:us3mEn50q30:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zparacha?a=7jOeW0OSWPc:us3mEn50q30:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/zparacha?i=7jOeW0OSWPc:us3mEn50q30:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/zparacha/~4/7jOeW0OSWPc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.zparacha.com/free-color-tools-for-webdesigners/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		<feedburner:origLink>http://www.zparacha.com/free-color-tools-for-webdesigners/</feedburner:origLink></item>
		<item>
		<title>How to position HTML element in the center using CSS.</title>
		<link>http://feedproxy.google.com/~r/zparacha/~3/xwEGApm5X5Y/</link>
		<comments>http://www.zparacha.com/how-to-position-html-element-in-the-center-using-css/#comments</comments>
		<pubDate>Wed, 20 Jan 2010 04:56:58 +0000</pubDate>
		<dc:creator>Zaheer Paracha</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[cascading_style_sheet]]></category>
		<category><![CDATA[positioning]]></category>
		<category><![CDATA[web development tools]]></category>

		<guid isPermaLink="false">http://www.zparacha.com/?p=1035</guid>
		<description><![CDATA[Positioning text in the center of an element is easily done using text-align:center property. But how do you position an entire element, for e.g; a div or an image in the center of the containing parent element? For example, if you want to put an image at the center of<a href="http://www.zparacha.com/how-to-position-html-element-in-the-center-using-css/"> Continue Reading <span style="font-size:1.35em;">&#187;</span></a><p><a href="http://www.zparacha.com/how-to-position-html-element-in-the-center-using-css/">How to position HTML element in the center using CSS.</a> is a post from: <a href="http://www.zparacha.com">zParacha.com | Effective programming and blogging tips by Zaheer Paracha</a></p>



<span style="font-weight:bold;"> Related posts:</span><ul><li><a href='http://www.zparacha.com/ad_placement/' rel='bookmark' title='Permanent Link: Position Ad Units in Posts'>Position Ad Units in Posts</a> <small>Photo credit: AMagill Ever since I started placing AdSense units...</small></li>
<li><a href='http://www.zparacha.com/doctype-explained/' rel='bookmark' title='Permanent Link: An HTML element you don&#39;t want to omit.'>An HTML element you don&#39;t want to omit.</a> <small>As web developers we have the tendency to blame web...</small></li>
<li><a href='http://www.zparacha.com/textfield_focus/' rel='bookmark' title='Permanent Link: Set focus on the first text field of HTML form.'>Set focus on the first text field of HTML form.</a> <small>A HTML form is a very good channel that you...</small></li>
</ul>]]></description>
			<content:encoded><![CDATA[<div class="wpbuzzer_button" style="float: right"><a title="Post on Google Buzz" class="google-buzz-button" href="http://www.google.com/buzz/post" data-button-style="normal-count" data-url="http://www.zparacha.com/how-to-position-html-element-in-the-center-using-css/" data-imageurl=""></a><script type="text/javascript" src="http://www.google.com/buzz/api/button.js"></script></div><p><!--adsense#greyLeft-->Positioning text in the center of an element is easily done using text-align:center property. But how do you position an entire element, for e.g; a div or an image in the center of the containing parent element?</p>
<p>For example, if you want to put an image at the center of your header div how do you accomplish this?</p>
<p>There are several ways to align an element in the center but the preferred and elegant method is to use <b>margin</b> property. <span id="more-1035"></span></p>
<p>By setting left and right margin widths to &#8220;auto&#8221; you tell the browser to put this element at the horizontal center of the the parent element.</p>
<div style="border:1px solid #333;background:#fff;width:450px;">
<h4>Outer DIV</h4>
<div style="margin:auto; background:#eee;width:50%">
THIS DIV is in the center of the parent div. We used following CSS declaration to align this div.</p>
<pre>
#outerDiv{
 background:#fff;
 border:1px solid #333;
 width:450px;

}
#innerDiv{
  <strong>margin:auto;</strong>
  background:#eee;
  width:50%
}
</div>
</div>
</pre>
<p>Piece of cake, huh? Not so fast. This approach will work in all browsers except, you guessed it, in IE6. I am sure you are not surprised that IE6 will not render this div as you would have expected. But there is a workaround for this IE6 behavior. You can set <strong>text-align</strong> property of the outer div to center and this will align your inner div nicely in the center in IE6. </p>
<p><!--adsense#tla--></p>
<p>This will, however, introduce a side effect. Since you are setting text-align property of the parent element to center, your inner div (the child) will inherit this property also and the text will be center-aligned. If you don&#8217;t want your text to be in the center, reset text-align property at the child level by adding <strong>text-align:left;</strong></p>
<p>So your final style sheet will have this declaration.</p>
<div style="border:1px solid #333;background:#fff;width:450px;text-align:center;">
<h4 style="text-align:left;">Outer DIV</h4>
<div style="margin:auto; background:#eee;width:50%;text-align:left;">
THIS DIV is in the center of the parent div. We used following CSS declaration to align this div.
<pre>
#outerDiv{
 background:#fff;
 border:1px solid #333;
 width:450px;
<strong> text-align:center;</strong>
}
#innerDiv{
 margin:auto;
 background:#eee;
 width:50%
 <strong>text-align:left;</strong>
}
</div>
</div>
</pre>
<p>Good luck!</p>
<div class="tweetmeme_button" style="float:right; margin: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.zparacha.com%2Fhow-to-position-html-element-in-the-center-using-css%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.zparacha.com%2Fhow-to-position-html-element-in-the-center-using-css%2F&amp;source=zparacha&amp;style=normal&amp;service=bit.ly" height="61" width="50" title="How to position HTML element in the center using CSS." alt=" How to position HTML element in the center using CSS." /><br />
			</a>
		</div>
<p><a href="http://www.zparacha.com/how-to-position-html-element-in-the-center-using-css/">How to position HTML element in the center using CSS.</a> is a post from: <a href="http://www.zparacha.com">zParacha.com | Effective programming and blogging tips by Zaheer Paracha</a></p>
<img src="http://www.zparacha.com/?ak_action=api_record_view&id=1035&type=feed" alt=" How to position HTML element in the center using CSS."  title="How to position HTML element in the center using CSS." />

<p><span style="font-weight:bold;"> Related posts:</span><ul><li><a href='http://www.zparacha.com/ad_placement/' rel='bookmark' title='Permanent Link: Position Ad Units in Posts'>Position Ad Units in Posts</a> <small>Photo credit: AMagill Ever since I started placing AdSense units...</small></li>
<li><a href='http://www.zparacha.com/doctype-explained/' rel='bookmark' title='Permanent Link: An HTML element you don&#39;t want to omit.'>An HTML element you don&#39;t want to omit.</a> <small>As web developers we have the tendency to blame web...</small></li>
<li><a href='http://www.zparacha.com/textfield_focus/' rel='bookmark' title='Permanent Link: Set focus on the first text field of HTML form.'>Set focus on the first text field of HTML form.</a> <small>A HTML form is a very good channel that you...</small></li>
</ul></p>
<p><a href="http://feedads.g.doubleclick.net/~a/f9nXhQFERviMnDxMorxWrrWfvBI/0/da"><img src="http://feedads.g.doubleclick.net/~a/f9nXhQFERviMnDxMorxWrrWfvBI/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/f9nXhQFERviMnDxMorxWrrWfvBI/1/da"><img src="http://feedads.g.doubleclick.net/~a/f9nXhQFERviMnDxMorxWrrWfvBI/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/zparacha?a=xwEGApm5X5Y:6HoJR4oAhsM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/zparacha?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zparacha?a=xwEGApm5X5Y:6HoJR4oAhsM:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/zparacha?i=xwEGApm5X5Y:6HoJR4oAhsM:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zparacha?a=xwEGApm5X5Y:6HoJR4oAhsM:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/zparacha?i=xwEGApm5X5Y:6HoJR4oAhsM:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/zparacha/~4/xwEGApm5X5Y" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.zparacha.com/how-to-position-html-element-in-the-center-using-css/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.zparacha.com/how-to-position-html-element-in-the-center-using-css/</feedburner:origLink></item>
		<item>
		<title>Jump-start your blog with free gifts from ProBlogger.</title>
		<link>http://feedproxy.google.com/~r/zparacha/~3/x4YyYLZvLK4/</link>
		<comments>http://www.zparacha.com/problogger-new-year-bonus/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 16:30:28 +0000</pubDate>
		<dc:creator>Zaheer Paracha</dc:creator>
				<category><![CDATA[Blogging]]></category>

		<guid isPermaLink="false">http://www.zparacha.com/?p=1019</guid>
		<description><![CDATA[If one of your new year resolutions for 2010 is to improve your blogging and take your blog to the next level then I have a great news for you. ProBlogger Darren is offering a sweet deal on his very popular 31 Days to Build a Better Blog workbook. For<a href="http://www.zparacha.com/problogger-new-year-bonus/"> Continue Reading <span style="font-size:1.35em;">&#187;</span></a><p><a href="http://www.zparacha.com/problogger-new-year-bonus/">Jump-start your blog with free gifts from ProBlogger.</a> is a post from: <a href="http://www.zparacha.com">zParacha.com | Effective programming and blogging tips by Zaheer Paracha</a></p>



<span style="font-weight:bold;"> Related posts:</span><ul><li><a href='http://www.zparacha.com/free-web-site-templates/' rel='bookmark' title='Permanent Link: Jump start your next web design project with free web  templates'>Jump start your next web design project with free web  templates</a> <small>Starting a web site development project using an existing template...</small></li>
<li><a href='http://www.zparacha.com/build-blog-31-days-problogger/' rel='bookmark' title='Permanent Link: Build a better blog in 31 days with ProBlogger'>Build a better blog in 31 days with ProBlogger</a> <small>One of the first blogging tips blogs I started following...</small></li>
<li><a href='http://www.zparacha.com/why-you-join-problogger-community-now/' rel='bookmark' title='Permanent Link: Why you should join ProBlogger community NOW.'>Why you should join ProBlogger community NOW.</a> <small>Recently Darren Rowes of problogger.net launched a premium forum for...</small></li>
</ul>]]></description>
			<content:encoded><![CDATA[<div class="wpbuzzer_button" style="float: right"><a title="Post on Google Buzz" class="google-buzz-button" href="http://www.google.com/buzz/post" data-button-style="normal-count" data-url="http://www.zparacha.com/problogger-new-year-bonus/" data-imageurl=""></a><script type="text/javascript" src="http://www.google.com/buzz/api/button.js"></script></div><p><img src="http://www.zparacha.com/images/ebook.png" class="alignleft" title="Jump start your blog with free gifts from ProBlogger." alt="ebook Jump start your blog with free gifts from ProBlogger." />If one of your new year resolutions for 2010 is to improve your blogging and take your blog to the next level then I have a great news for you. ProBlogger Darren is offering a sweet deal on his very popular  <strong>31 Days to Build a Better Blog</strong> workbook. For a limited time you will receive following three items for free when you buy the workbook. <span id="more-1019"></span></p>
<ul>
<li>
<p>Free Report: 9 Things to Do to Get Your Blog On Track in The New Year</p>
<li>Podcast with Leo Babauta from Zen Habits</li>
<li>Podcast with Neil Patel from QuickSprout</li>
</ul>
<p>For just $19.95 this is a steal, so if you were planning to spend some money on learning about blogging this is good place to invest.<br />
You can make your purchase <a href="http://www.problogger.net/31dbbb-workbook/"> here.</a></p>
<p><!--adsense#tla-->
<div class="tweetmeme_button" style="float:right; margin: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.zparacha.com%2Fproblogger-new-year-bonus%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.zparacha.com%2Fproblogger-new-year-bonus%2F&amp;source=zparacha&amp;style=normal&amp;service=bit.ly" height="61" width="50" title="Jump start your blog with free gifts from ProBlogger." alt=" Jump start your blog with free gifts from ProBlogger." /><br />
			</a>
		</div>
<p><a href="http://www.zparacha.com/problogger-new-year-bonus/">Jump-start your blog with free gifts from ProBlogger.</a> is a post from: <a href="http://www.zparacha.com">zParacha.com | Effective programming and blogging tips by Zaheer Paracha</a></p>
<img src="http://www.zparacha.com/?ak_action=api_record_view&id=1019&type=feed" alt=" Jump start your blog with free gifts from ProBlogger."  title="Jump start your blog with free gifts from ProBlogger." />

<p><span style="font-weight:bold;"> Related posts:</span><ul><li><a href='http://www.zparacha.com/free-web-site-templates/' rel='bookmark' title='Permanent Link: Jump start your next web design project with free web  templates'>Jump start your next web design project with free web  templates</a> <small>Starting a web site development project using an existing template...</small></li>
<li><a href='http://www.zparacha.com/build-blog-31-days-problogger/' rel='bookmark' title='Permanent Link: Build a better blog in 31 days with ProBlogger'>Build a better blog in 31 days with ProBlogger</a> <small>One of the first blogging tips blogs I started following...</small></li>
<li><a href='http://www.zparacha.com/why-you-join-problogger-community-now/' rel='bookmark' title='Permanent Link: Why you should join ProBlogger community NOW.'>Why you should join ProBlogger community NOW.</a> <small>Recently Darren Rowes of problogger.net launched a premium forum for...</small></li>
</ul></p>
<p><a href="http://feedads.g.doubleclick.net/~a/e0sAT9BwLszulsr9BkMZLyA9oYQ/0/da"><img src="http://feedads.g.doubleclick.net/~a/e0sAT9BwLszulsr9BkMZLyA9oYQ/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/e0sAT9BwLszulsr9BkMZLyA9oYQ/1/da"><img src="http://feedads.g.doubleclick.net/~a/e0sAT9BwLszulsr9BkMZLyA9oYQ/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/zparacha?a=x4YyYLZvLK4:BcjbxPpKGmI:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/zparacha?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zparacha?a=x4YyYLZvLK4:BcjbxPpKGmI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/zparacha?i=x4YyYLZvLK4:BcjbxPpKGmI:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zparacha?a=x4YyYLZvLK4:BcjbxPpKGmI:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/zparacha?i=x4YyYLZvLK4:BcjbxPpKGmI:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/zparacha/~4/x4YyYLZvLK4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.zparacha.com/problogger-new-year-bonus/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.zparacha.com/problogger-new-year-bonus/</feedburner:origLink></item>
		<item>
		<title>TwitterTools plugin publishing tweets without URL</title>
		<link>http://feedproxy.google.com/~r/zparacha/~3/XIcI9tnu7zc/</link>
		<comments>http://www.zparacha.com/twittertools-plugin-publishing-tweets-without-url/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 05:24:14 +0000</pubDate>
		<dc:creator>Zaheer Paracha</dc:creator>
				<category><![CDATA[Blogging]]></category>
		<category><![CDATA[bit.ly]]></category>
		<category><![CDATA[Twitter]]></category>
		<category><![CDATA[TwitterTools]]></category>

		<guid isPermaLink="false">http://www.zparacha.com/?p=998</guid>
		<description><![CDATA[I have TwitterTools plugin to tweet my new blog posts to my twitter account. Recently I noticed that my tweets from TwitterTools plugin do not have the URL to my posts. I checked my plugin settings and everything looked OK. I thought may be I have wrong user id and<a href="http://www.zparacha.com/twittertools-plugin-publishing-tweets-without-url/"> Continue Reading <span style="font-size:1.35em;">&#187;</span></a><p><a href="http://www.zparacha.com/twittertools-plugin-publishing-tweets-without-url/">TwitterTools plugin publishing tweets without URL</a> is a post from: <a href="http://www.zparacha.com">zParacha.com | Effective programming and blogging tips by Zaheer Paracha</a></p>



<span style="font-weight:bold;"> Related posts:</span><ul><li><a href='http://www.zparacha.com/make-adsense-deluxe-plugin-work-with-wordpress-2-8-5/' rel='bookmark' title='Permanent Link: Make AdSense Deluxe plugin work with WordPress 2.8.5'>Make AdSense Deluxe plugin work with WordPress 2.8.5</a> <small>Recently I upgraded to WordPress 2.8.5. The upgrade process itself...</small></li>
<li><a href='http://www.zparacha.com/publish-your-blog-posts-to-twitter-with-feedburne/' rel='bookmark' title='Permanent Link: Publish your blog posts to Twitter with Feedburner.'>Publish your blog posts to Twitter with Feedburner.</a> <small>One of earliest third party tools that I started using...</small></li>
<li><a href='http://www.zparacha.com/auto-reply-to-new-twitter-followers/' rel='bookmark' title='Permanent Link: Send a thank you message to your new Twitter followers'>Send a thank you message to your new Twitter followers</a> <small>Have you ever wondered how when you “follow” certain Twitter...</small></li>
</ul>]]></description>
			<content:encoded><![CDATA[<div class="wpbuzzer_button" style="float: right"><a title="Post on Google Buzz" class="google-buzz-button" href="http://www.google.com/buzz/post" data-button-style="normal-count" data-url="http://www.zparacha.com/twittertools-plugin-publishing-tweets-without-url/" data-imageurl=""></a><script type="text/javascript" src="http://www.google.com/buzz/api/button.js"></script></div><p><!--adsense#greyLeft-->I have TwitterTools plugin to tweet my new blog posts to my <a id="aptureLink_oajVYsIdgH" href="http://www.amazon.com/gp/product/0470479914?tag=zaheparc-20">twitter</a> account. Recently I noticed that my tweets from TwitterTools plugin do not have the URL to my posts. I checked my plugin settings and everything looked OK. <span id="more-998"></span></p>
<p>I thought may be I have wrong user id and API key for my bit.ly account so I checked the user id and the account key and that combination <strong>appeared</strong> to be correct.  I tried disabling and then re-enabling the plugin but that did not help.  I was inclined to blame the plugin developer for this <strong>bug</strong> but being a software developer I strongly believe in <strong>user error</strong> scenario so I decided to double check the settings that require user input.</p>
<p>In the plugin settings you need to provide</p>
<ul>
<li>
 your Twitter id and password </li>
<li>bit.ly username and API key.</li>
</ul>
<p>My Twitter account information was correct since the plugin was able to post my tweets. </p>
<p><!--adsense#tla--></p>
<p>Next I checked my bit.ly settings and guess what I found. A space at the end of my bit.ly API key! Although to naked eye the API key looked OK, however on close examination I found an empty space at the end. That empty space was causing a failed authentication on bit.ly side hence there was no URL in the tweets. I removed the empty space and now everything is peachy. </p>
<p>If you are also facing the same problem with TwitterTools plugin make sure there is no extra space in your bit.ly API key. </p>
<p>Good luck!</p>
<div class="tweetmeme_button" style="float:right; margin: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.zparacha.com%2Ftwittertools-plugin-publishing-tweets-without-url%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.zparacha.com%2Ftwittertools-plugin-publishing-tweets-without-url%2F&amp;source=zparacha&amp;style=normal&amp;service=bit.ly" height="61" width="50" title="TwitterTools plugin publishing tweets without URL " alt=" TwitterTools plugin publishing tweets without URL " /><br />
			</a>
		</div>
<p><a href="http://www.zparacha.com/twittertools-plugin-publishing-tweets-without-url/">TwitterTools plugin publishing tweets without URL</a> is a post from: <a href="http://www.zparacha.com">zParacha.com | Effective programming and blogging tips by Zaheer Paracha</a></p>
<img src="http://www.zparacha.com/?ak_action=api_record_view&id=998&type=feed" alt=" TwitterTools plugin publishing tweets without URL "  title="TwitterTools plugin publishing tweets without URL " />

<p><span style="font-weight:bold;"> Related posts:</span><ul><li><a href='http://www.zparacha.com/make-adsense-deluxe-plugin-work-with-wordpress-2-8-5/' rel='bookmark' title='Permanent Link: Make AdSense Deluxe plugin work with WordPress 2.8.5'>Make AdSense Deluxe plugin work with WordPress 2.8.5</a> <small>Recently I upgraded to WordPress 2.8.5. The upgrade process itself...</small></li>
<li><a href='http://www.zparacha.com/publish-your-blog-posts-to-twitter-with-feedburne/' rel='bookmark' title='Permanent Link: Publish your blog posts to Twitter with Feedburner.'>Publish your blog posts to Twitter with Feedburner.</a> <small>One of earliest third party tools that I started using...</small></li>
<li><a href='http://www.zparacha.com/auto-reply-to-new-twitter-followers/' rel='bookmark' title='Permanent Link: Send a thank you message to your new Twitter followers'>Send a thank you message to your new Twitter followers</a> <small>Have you ever wondered how when you “follow” certain Twitter...</small></li>
</ul></p>
<p><a href="http://feedads.g.doubleclick.net/~a/Ktr1ot7me6sTZsrV4EL832RU45Q/0/da"><img src="http://feedads.g.doubleclick.net/~a/Ktr1ot7me6sTZsrV4EL832RU45Q/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Ktr1ot7me6sTZsrV4EL832RU45Q/1/da"><img src="http://feedads.g.doubleclick.net/~a/Ktr1ot7me6sTZsrV4EL832RU45Q/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/zparacha?a=XIcI9tnu7zc:y5oGvBNLNT8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/zparacha?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zparacha?a=XIcI9tnu7zc:y5oGvBNLNT8:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/zparacha?i=XIcI9tnu7zc:y5oGvBNLNT8:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/zparacha?a=XIcI9tnu7zc:y5oGvBNLNT8:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/zparacha?i=XIcI9tnu7zc:y5oGvBNLNT8:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/zparacha/~4/XIcI9tnu7zc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.zparacha.com/twittertools-plugin-publishing-tweets-without-url/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.zparacha.com/twittertools-plugin-publishing-tweets-without-url/</feedburner:origLink></item>
	</channel>
</rss>
