<?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>Standardista</title>
	<atom:link href="http://www.standardista.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.standardista.com</link>
	<description>CSS3, JavaScript and HTML5 explained</description>
	<lastBuildDate>Wed, 11 Apr 2012 02:22:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Stop SOPA &#8211; Snippet to turn your site off on January 18, 2012</title>
		<link>http://www.standardista.com/stop-sopa/</link>
		<comments>http://www.standardista.com/stop-sopa/#comments</comments>
		<pubDate>Fri, 13 Jan 2012 02:18:41 +0000</pubDate>
		<dc:creator>Estelle Weyl</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[politics]]></category>
		<category><![CDATA[stopsopa]]></category>

		<guid isPermaLink="false">http://www.standardista.com/?p=583</guid>
		<description><![CDATA[Black out your own blogs on january in opposition to SOPA. You can do so by adding this script to your site: 
<a href="https://github.com/estelle/StopSOPA">Download the code from GitHub</a> 
Note: To see it in action before January 18, set your computer clock to the 18th. 
 ]]></description>
			<content:encoded><![CDATA[<p>Black out your own blogs on january in opposition to SOPA. You can do so by adding this script to your site:<br />
<a href="https://github.com/estelle/StopSOPA">Download the code from GitHub</a><br />
Note: To see it in action before January 18, set your computer clock to the 18th.</p>
Error when loading gists from http://gist.github.com/.<script src="https://gist.github.com/1610686.js"> </script>
]]></content:encoded>
			<wfw:commentRss>http://www.standardista.com/stop-sopa/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>SpeciFISHity: CSS Specificity</title>
		<link>http://www.standardista.com/specifishity-css-specificity/</link>
		<comments>http://www.standardista.com/specifishity-css-specificity/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 22:05:36 +0000</pubDate>
		<dc:creator>Estelle Weyl</dc:creator>
				<category><![CDATA[css3]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[attributes]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[css selectors]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[web tutorial]]></category>

		<guid isPermaLink="false">http://www.standardista.com/?p=566</guid>
		<description><![CDATA[<p>Some people are confused by CSS Specificity, especially with all of the (not-so) new CSS3 Selectors. The image below may help make sense of CSS Specificity. </p>
<p>X-0-0: The number of ID selectors, represented by Sharks<br />
0-Y-0: The number of class &#8230; <a href="http://www.standardista.com/specifishity-css-specificity/" class="read_more">More &#8230;</a></p>]]></description>
			<content:encoded><![CDATA[<p>Some people are confused by CSS Specificity, especially with all of the (not-so) new CSS3 Selectors. The image below may help make sense of CSS Specificity. </p>
<p>X-0-0: The number of ID selectors, represented by Sharks<br />
0-Y-0: The number of class selectors, attributes selectors, and pseudo-classes, represented by Fish<br />
0-0-Z: The number of type selectors and pseudo-elements, represented by Plankton a la Spongebob<br />
*: The universal selector has no value </p>
<p>Download the specificity chart and read the rest of the <a href="http://www.standardista.com/css3/css-specificity/">SpeciFISHity</a> article here</p>
]]></content:encoded>
			<wfw:commentRss>http://www.standardista.com/specifishity-css-specificity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>World flags with CSS3 Gradients</title>
		<link>http://www.standardista.com/world-flags-with-css3-gradients/</link>
		<comments>http://www.standardista.com/world-flags-with-css3-gradients/#comments</comments>
		<pubDate>Mon, 10 Oct 2011 16:38:43 +0000</pubDate>
		<dc:creator>Estelle Weyl</dc:creator>
				<category><![CDATA[css3]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.standardista.com/?p=528</guid>
		<description><![CDATA[<p>About 6 months ago I was bored. While most people go on bike rides, watch a movie or read a novel when this happens to them, I am a bit different. I find CSS3 entertaining. So, in my &#8216;down&#8217; time &#8230; <a href="http://www.standardista.com/world-flags-with-css3-gradients/" class="read_more">More &#8230;</a></p>]]></description>
			<content:encoded><![CDATA[<p>About 6 months ago I was bored. While most people go on bike rides, watch a movie or read a novel when this happens to them, I am a bit different. I find CSS3 entertaining. So, in my &#8216;down&#8217; time I created some world flags with CSS gradients. Today I realized some people might be entertained or learn from them, so here is the link: </p>
<p><a href="http://www.standardista.com/CSS3gradients/flags.html" title="World Flags done with CSS3 Gradients">http://www.standardista.com/CSS3gradients/flags.html</a></p>
<p><object data="http://www.standardista.com/CSS3gradients/flags.html" style="height: 500px; overflow:scroll; width: 500px;"></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.standardista.com/world-flags-with-css3-gradients/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HSLA Color Picker / RGBA Converter</title>
		<link>http://www.standardista.com/hsla-color-picker/</link>
		<comments>http://www.standardista.com/hsla-color-picker/#comments</comments>
		<pubDate>Sat, 03 Sep 2011 05:13:31 +0000</pubDate>
		<dc:creator>Estelle Weyl</dc:creator>
				<category><![CDATA[css3]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.standardista.com/?p=488</guid>
		<description><![CDATA[<p><object data="http://standardista.com/webkit/ch7/hsla.html" style="width: 700px; height: 450px;">
<div style="background-color: #fff; border-radius: 5px; border: #78B2B6 solid 1px; padding: 10px;">color:<b>hsla</b>(<br />
   <span class="hsl-value" id="hsl-h-value">328,</span>&#160;&#160;<br />
<input id="hsl-h" type="range" min="0" max="360" value="328" onChange="changeHSL()"/>&#160;H&#160;&#160;
<div id="hslah">blah</div>
<p>   <span class="hsl-value" id="hsl-s-value">100%,</span>&#160;&#160;<br />
<input id="hsl-s" type="range" min="0" max="100" value="100" onChange="changeHSL()"/>&#160;S&#160;&#160;
<div id="hslas"></div>
</p><p>   <span class="hsl-value" id="hsl-l-value">44%,</span>&#160;&#160;<br />
<input id="hsl-l" type="range" min="0" max="100" value="44" onChange="changeHSL()"/>&#160;L&#160;&#160;
<div id="hslal"></div>
</p><p>   <span class="hsl-value" id="hsl-a-value">1.00</span>&#160;&#160;<br />
<input id="hsl-a" type="range" min="0" max="100" value="100" onChange="changeHSL()"/>&#160;A&#160;&#160;
<div id="hslaa"></div>
</p><p>);        </p></div>
<h1 id="hsl-example" class="example" style="background-color:  hsla(328, 100%, 44%, 1); text-align: center; color: #FFF; text-shadow: 2px 2px 2px rgba(0,0,0,0.4); font-size: 40px; font-weight: bold;"> HSLA Colors</h1>
<p><script defer="">function changeHSL(){var a=document.getElementById("hsl-h").value*1;var b=document.getElementById("hsl-s").value*1;var c=document.getElementById("hsl-l").value*1;var d=(document.getElementById("hsl-a").value/100).toFixed(2);var e=document.getElementById("hsl-example");e.style.backgroundColor="hsla("+a+", "+b+"%, "+c+"%, "+d+")";document.getElementById("hsl-h-value").textContent=a+",";document.getElementById("hsl-s-value").textContent=b+"%,";document.getElementById("hsl-l-value").textContent=c+"%,";document.getElementById("hsl-a-value").textContent=d+"";createHSLA(a,b,c,d)}function createHSLA(a,b,c,d){var a=a&#124;&#124;document.getElementById("hsl-h").value*1;var b=b&#124;&#124;document.getElementById("hsl-s").value*1;var c=c&#124;&#124;document.getElementById("hsl-l").value*1;var d=d&#124;&#124;(document.getElementById("hsl-a").value/100).toFixed(2);var e="";for(var f=0;f< =360;f++){e+='<i style="background: hsla('+f+", "+b+"%, "+c+"%, "+d+')">'}document.getElementById("hslah").innerHTML=e;document.getElementById("hslas").style.background="-webkit-linear-gradient(0deg, hsl("+a+", 0%, "+c+"%) </script></p></object>&#8230; <a href="http://www.standardista.com/hsla-color-picker/" class="read_more">More &#8230;</a></p>]]></description>
			<content:encoded><![CDATA[<p><object data="http://standardista.com/webkit/ch7/hsla.html" style="width: 700px; height: 450px;">
<div style="background-color: #fff; border-radius: 5px; border: #78B2B6 solid 1px; padding: 10px;">color:<b>hsla</b>(<br />
   <span class="hsl-value" id="hsl-h-value">328,</span>&nbsp;&nbsp;<br />
<input id="hsl-h" type="range" min="0" max="360" value="328" onChange="changeHSL()">&nbsp;H&nbsp;&nbsp;
<div id="hslah">blah</div>
<p>   <span class="hsl-value" id="hsl-s-value">100%,</span>&nbsp;&nbsp;<br />
<input id="hsl-s" type="range" min="0" max="100" value="100" onChange="changeHSL()">&nbsp;S&nbsp;&nbsp;
<div id="hslas"></div>
<p>   <span class="hsl-value" id="hsl-l-value">44%,</span>&nbsp;&nbsp;<br />
<input id="hsl-l" type="range" min="0" max="100" value="44" onChange="changeHSL()">&nbsp;L&nbsp;&nbsp;
<div id="hslal"></div>
<p>   <span class="hsl-value" id="hsl-a-value">1.00</span>&nbsp;&nbsp;<br />
<input id="hsl-a" type="range" min="0" max="100" value="100" onChange="changeHSL()">&nbsp;A&nbsp;&nbsp;
<div id="hslaa"></div>
<p>);        </p></div>
<h1 id="hsl-example" class="example" style="background-color:  hsla(328, 100%, 44%, 1); text-align: center; color: #FFF; text-shadow: 2px 2px 2px rgba(0,0,0,0.4); font-size: 40px; font-weight: bold;"> HSLA Colors</h1>
<p><script defer="">function changeHSL(){var a=document.getElementById("hsl-h").value*1;var b=document.getElementById("hsl-s").value*1;var c=document.getElementById("hsl-l").value*1;var d=(document.getElementById("hsl-a").value/100).toFixed(2);var e=document.getElementById("hsl-example");e.style.backgroundColor="hsla("+a+", "+b+"%, "+c+"%, "+d+")";document.getElementById("hsl-h-value").textContent=a+",";document.getElementById("hsl-s-value").textContent=b+"%,";document.getElementById("hsl-l-value").textContent=c+"%,";document.getElementById("hsl-a-value").textContent=d+"";createHSLA(a,b,c,d)}function createHSLA(a,b,c,d){var a=a||document.getElementById("hsl-h").value*1;var b=b||document.getElementById("hsl-s").value*1;var c=c||document.getElementById("hsl-l").value*1;var d=d||(document.getElementById("hsl-a").value/100).toFixed(2);var e="";for(var f=0;f<=360;f++){e+='<i style="background: hsla('+f+", "+b+"%, "+c+"%, "+d+')"></i>'}document.getElementById("hslah").innerHTML=e;document.getElementById("hslas").style.background="-webkit-linear-gradient(0deg, hsl("+a+", 0%, "+c+"%) 0%, hsl("+a+", 100%, "+c+"%) 100%)";document.getElementById("hslal").style.background="-webkit-linear-gradient(0deg, hsla("+a+", "+b+"%, 0%, 1) 0%, hsla("+a+", "+b+"%, 50%, 1) 50%,  hsla("+a+", "+b+"%, 100%, 1) 100%)";document.getElementById("hslaa").style.background="-webkit-linear-gradient(0deg, hsla("+a+", "+b+"%, "+c+"%, 0) 0%, hsla("+a+", "+b+"%, "+c+"%, 1) 100%)"}changeHSL();createHSLA();</script></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.standardista.com/hsla-color-picker/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>6 Best Practices for Marking up your HTML5</title>
		<link>http://www.standardista.com/6-best-practices-for-marking-up-your-html5/</link>
		<comments>http://www.standardista.com/6-best-practices-for-marking-up-your-html5/#comments</comments>
		<pubDate>Thu, 18 Aug 2011 02:37:55 +0000</pubDate>
		<dc:creator>Estelle Weyl</dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[web standards]]></category>

		<guid isPermaLink="false">http://www.standardista.com/?p=481</guid>
		<description><![CDATA[<p>There are several coding rules required for XHTML that were optional or even unsupported in HTML 4. While HTML5 supports both coding formats, there are some non-required best practices. We cover the top 6 in this post.</p> 
]]></description>
			<content:encoded><![CDATA[<p>There are several coding rules required for XHTML that were optional or even unsupported in HTML 4. While HTML5 supports both coding formats, here are some non-required best practices:</p>
<ol>
<li><strong>Use lowercase for markup</strong>: In XHTML the element tags must all be in lowercase as must all the attribute names. While HTML5 supports camel case and everything else, please use all lowercase markup. Nothing in the W3C states that attribute values need to be lowercase, but some, like id, are case sensitive, so stick to lower case.</li>
<li> <strong>Quote all attributes</strong>: In XHTML, all attribute values must be encased in single or double quotes. In HTML5, only attribute values with spaces or special characters are required to be in quotes. Make your code legible. Make us happy. Quote all attributes.</li>
<li><strong>Close all elements</strong>: In XHTML, every opening tag must have a closing tag. Empty elements such as &lt;img/&gt; and &lt;br/&gt; must be self-closing. In HTML5 some tags can be left unclosed. While omitting the trailing slash or closing element reduces the number of characters on a page, it also allows for sloppy code.Some speakers / blog posts recommend omitting trailing slashes and end tags to reduce the number of characters to make smaller files for mobile. The few bytes saved are not worth the risk, especially in non-empty elements. Reducing the number of DOM elements will have more of an impact than reducing the number of characters in this way. Make us happy. Provide a closing tag for each opening tag.</li>
<li> <strong>Nest all elements</strong>: In XHTML, all tags must be properly nested: If you start tag &lt;a&gt; and then start, or nest, a &lt;strong&gt;, you must close tag &lt;/strong&gt; before you close the &lt;/a&gt;. All tags must be nested correctly, which is easier to trouble shoot if you close all elements (see above).</li>
<li><strong>Be consistent in providing values for all attributes: </strong>In XHTML, all attributes must be coded as attribute/value pairs, even Boolean values. The default selected option in XHTML should be written selected=&#8221;selected&#8221;. In HTML5, the same can simply be coded as selected. Providing values for Boolean attributes is not necessary, since including the attribute property makes a Boolean value true even if the value of the attribute is false in most browsers. Whether you choose to include or not include Boolean values, be consistent with your decision either way. If you include Boolean values, always include them. If you omit them, always omit them. And, if you include a =&#8221;" for a Boolean (or even non-Boolean) attribute, always include the value, as the empty quotes can have unintended consequences, especially when it comes to the form attribute.</li>
<li> <strong>Use the most semantically correct element for the job:</strong> In XHTML, elements need to be coded in a semantic manner. Tables and forms cannot be included in paragraphs. Form elements, being phrase elements, need to be contained within a semantic block level element, such as a paragraph or table cell. Yes, you can use spans and divs to contain everything on your page, but if a header is a header, use an &lt;h1-6&gt; tag.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.standardista.com/6-best-practices-for-marking-up-your-html5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Named colors =&gt; Their HSL and RGB color values</title>
		<link>http://www.standardista.com/new-post-on-named-colors/</link>
		<comments>http://www.standardista.com/new-post-on-named-colors/#comments</comments>
		<pubDate>Sat, 21 May 2011 20:40:05 +0000</pubDate>
		<dc:creator>Estelle Weyl</dc:creator>
				<category><![CDATA[css3]]></category>

		<guid isPermaLink="false">http://www.standardista.com/?p=452</guid>
		<description><![CDATA[<p>CSS3 adds names colors from SVG and well as colors defined by Hue, Saturation and Lighness. I've added a new page to this blog that  lists all <a href="http://www.standardista.com/css3/cssnamed-hsl-and-rgb-colors">named colors along with their hexidecimal, RGB and HSL values</a>.</p>]]></description>
			<content:encoded><![CDATA[<p>CSS3 adds names colors from SVG and well as colors defined by Hue, Saturation and Lighness. I&#8217;ve added a new page to this blog that  lists all <a href="http://www.standardista.com/css3/cssnamed-hsl-and-rgb-colors">named colors along with their hexidecimal, RGB and HSL values</a>.</p>
<table>
<thead>
<tr>
<td>Named Color</td>
<td> Hex</td>
<td> RGB</td>
<td>HSL</td>
</tr>
</thead>
<tbody>
<tr>
<td>
  aliceblue	</td>
<td style="background-color: #F0F8FF">#F0F8FF</td>
<td>rgb(240,248,255)</td>
<td>hsl(208, 100%, 97%)</td>
</tr>
<tr>
<td>
  antiquewhite	</td>
<td style="background-color: #FAEBD7">#FAEBD7</td>
<td>rgb(250,235,215)</td>
<td>hsl(34, 78%, 91%)</td>
</tr>
<tr>
<td>
  aqua	/ cyan</td>
<td style="background-color: #00FFFF">#00FFFF</td>
<td>rgb(0,255,255)</td>
<td>hsl(180, 100%, 50%)</td>
</tr>
<tr>
<td>
  aquamarine	</td>
<td style="background-color: #7FFFD4">#7FFFD4</td>
<td>rgb(127,255,212)</td>
<td>hsl(160, 100%, 75%)</td>
</tr>
<tr>
<td>
  azure	</td>
<td style="background-color: #F0FFFF">#F0FFFF</td>
<td>rgb(240,255,255)</td>
<td>hsl(180, 100%, 97%)</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.standardista.com/new-post-on-named-colors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yes, you can start using HTML5 today</title>
		<link>http://www.standardista.com/yes-you-can-start-using-html5-today/</link>
		<comments>http://www.standardista.com/yes-you-can-start-using-html5-today/#comments</comments>
		<pubDate>Sat, 06 Nov 2010 00:34:07 +0000</pubDate>
		<dc:creator>Estelle Weyl</dc:creator>
				<category><![CDATA[HTML5]]></category>

		<guid isPermaLink="false">http://www.standardista.com/?p=424</guid>
		<description><![CDATA[People, including someone from the W3C, have stated that HTML5 is not ready for production. I've been asked several times "do you have any HTML5 websites."  This article provides for a list of some HTMl5 websites I have done and others have produced, and some resources to look into to help get you started.]]></description>
			<content:encoded><![CDATA[<p>People, including someone from the W3C, have stated that HTML5 is not ready for production. I&#8217;ve been asked several times &#8220;do you have any HTML5 websites.&#8221;  So, here is my list&#8230; not that they are the best, but just to show that they do exist (though my designer sends me flash, so i haven&#8217;t incorporated the &lt;video&gt; element yet:</p>
<ul>
<li><a href="http://www.uptake.com">http://www.uptake.com</a> (just the homepage now. working on the rest of the site)</li>
<li><a href="http://www.clarkdodgewealth.com">http://www.clarkdodgewealth.com</a></li>
<li><a href="http://www.caperberryevents.com">http://www.caperberryevents.com</a></li>
<li><a href="http://www.standardista.com">http://www.standardista.com</a> (that&#8217;s this one!)</li>
<li><a href="http://www.directsourcepackaging.com/">http://www.directsourcepackaging.com/</a></li>
<li><a href="http://www.poshpublicrelations.com/">http://www.poshpublicrelations.com/</a></li>
</ul>
<p>here are a few sites that list a bunch of HTML5 websites</p>
<ul>
<li><a href="http://www.devlounge.net/design/top-20-html5-and-css3-sites-to-inspire-you">20 HTML5 websites</a> to inspire you at devlounge</li>
<li><a href="http://html5gallery.com/">http://html5gallery.com/</a> (they keep on adding new ones almost daily)</li>
<li><a href="http://www.web3mantra.com/2010/08/11/30-examples-of-html5-websites/">30 HTML5 websites</a></li>
</ul>
<p>So, go ahead and use HTML5.  Use tools like:</p>
<ul>
<li><a href="http://html5boilerplate.com/">http://html5boilerplate.com</a> (templates to get you started)</li>
<li><a href="http://www.modernizr.com/">http://modernizr.com</a> (browser feature detection script)</li>
<li><a href="http://www.jquery.com">http://www.jquery.com</a> (for JavaScript)</li>
<li><a href="http://www.westciv.com/tools/">http://www.westciv.com/tools/</a> (for CSS3)</li>
<li><a href="http://www.CSS3Please.com">http://www.CSS3Please.com</a> (for CSS3)</li>
</ul>
<p>If you need some tutorials on some HTML5 topics, i&#8217;ve written a bunch:</p>
<ul>
<li><a href="http://www.standardista.com/html5/html5-introduction-to-canvas">&lt;canvas&gt;</a></li>
<li><a href="http://www.standardista.com/html5/introduction-to-geolocation">GeoLocation</a></li>
<li><a href="http://www.standardista.com/html5/offline-applications-application-cache-manifest-files">Application Cache</a> (Offline applications)</li>
<li><a href="http://standardista.com/interlabs">Web Forms</a></li>
<li><a href="http://www.standardista.com/mobile-html5-css3-web-development-android-iphone">Developing for Mobile</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.standardista.com/yes-you-can-start-using-html5-today/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Placeholder Attribute Support in ALL browsers</title>
		<link>http://www.standardista.com/html5-placeholder-attribute-script/</link>
		<comments>http://www.standardista.com/html5-placeholder-attribute-script/#comments</comments>
		<pubDate>Fri, 29 Oct 2010 07:36:28 +0000</pubDate>
		<dc:creator>Estelle Weyl</dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[web forms]]></category>
		<category><![CDATA[web tutorial]]></category>

		<guid isPermaLink="false">http://www.standardista.com/?p=422</guid>
		<description><![CDATA[There is no reason to NOT use HTML5 form attributes. HTML5 form elements enhance forms. In this quick snippet, we show how easy it is to get old browsers to pretend that they support the placeholder attribute]]></description>
			<content:encoded><![CDATA[<p>Included along with jQuery, the following code allows you to include the HTML5 <em>placeholder</em> attribute work in older browsers. The idea is to find all the input elements that have a placeholder attribute that the browser is ignoring since it doesn&#8217;t understand. Check to see if the input value is empty. If it is empty, include the placeholder value temporarily as the value (preferably making it look like a placeholder). If the user focuses on the input, clear the placeholder value, which is the default behavior in browsers that support the placeholder value.  When the user exits the input box, the script checks to see if there is a value. If not, reinstate the value of the placeholder.</p>
<p>The second script is for when the user submits the form: we want to make sure that the form is not alwasy submitting the placeholder value.  The main issue with this function is that the user cannot actually enter data that matches the placeholder, so, if you&#8217;re going to use this function,  make sure that the placeholder value is not one that a user would intentionally submit. For example, use &#8216;first name&#8217; and &#8216;last name&#8217; for names, rather than &#8216;john&#8217; and &#8216;doe&#8217;. Use &#8216;phone number&#8217; or  &#8217;415.555.1212&#8242; for phone numbers, and other implausible values, etc.</p>
<pre>  //make HTML5 placeholders work in non supportive browsers
  $("input[placeholder]").each(function(){
    if($(this).val()==""){
     // $(this).addClass('hasplaceholder');
      $(this).val($(this).attr("placeholder"));
      $(this).focus(function(){
        if($(this).val()==$(this).attr("placeholder")) $(this).val("");
       // $(this).removeClass('hasplaceholder');
      });
      $(this).blur(function(){
        if($(this).val()==""){
	  // $(this).addClass('hasplaceholder');
           $(this).val($(this).attr("placeholder"));
        }
       });
    }
  });

$('form').submit(function(evt){
	$('input[placeholder]').each(function(){
		if($(this).attr("placeholder") == $(this).val()) {$(this).val('');}
	});
});</pre>
<p>Here are the lines explained:</p>
<p>Finds and iterates thru each input with a placeholder attribute:<br />
<code> $("input[placeholder]").each(function(){ </code></p>
<p>Checks to see if the value is empty<br />
<code> if($(this).val()==""){ </code></p>
<p>Commented out, you can add this line to add a class to the inputs that currently don&#8217;t have a value, so you can stylize them to look like placeholders (in other words, change the color to light grey using CSS):<br />
<code> // $(this).addClass('hasplaceholder'); </code></p>
<p>Find the value of the placeholder attribute and sets it as the value of the value attribute<br />
<code>$(this).val($(this).attr("placeholder"));</code></p>
<p>Create an onFocus event handler<br />
<code>$(this).focus(function(){</code></p>
<p>When focused, checks to see if the current value matches the value of the placeholder. If so, it clears the placholder<br />
<code>if($(this).val()==$(this).attr("placeholder")) $(this).val("");</code></p>
<p>If you included the class to stylize the placeholder look and feel, remove it when the user is focusing on this input<br />
<code>// $(this).removeClass('hasplaceholder');</code></p>
<p>Close out the onFocus event handler<br />
<code>});</code></p>
<p>Create an onBlur event handler for when the user exits the input box<br />
<code>$(this).blur(function(){</code></p>
<p>Check to see if the input box is empty (the user has NOT entered any data)<br />
<code>if($(this).val()==""){</code></p>
<p>If the value is empty, we&#8217;re going to not just put the placeholder in, we should also include a class to be able to stylize it as a placeholder would look:<br />
<code>// $(this).addClass('hasplaceholder');</code></p>
<p>Put the value of the placeholder in the value &#8212; as we did on page load above.<br />
<code>$(this).val($(this).attr("placeholder"));</code></p>
<p>Close out all the set up stuff<br />
<code>}<br />
});<br />
}<br />
});</code></p>
<p>We also need to ensure that the element has a legitimate value when the form is sumbitted:</p>
<p>We create an onSubmit event handler:<br />
<code>$('form').submit(function(evt){</code></p>
<p>We go thru all the inputs that have the placeholder attribute:<br />
<code>$('input[placeholder]').each(function(){</code></p>
<p>If the current value matches the placeholder value, we clear it before sumbitting:<br />
<code>if($(this).attr("placeholder") == $(this).val()) {$(this).val('');}</code></p>
<p>We close out the function:<br />
<code>});<br />
});</code></p>
<p>Note that if the element is &#8216;required&#8217;, the submit function would be different and we would test to see if the browser supports the placeholder attribute before doing any of this, but i am just providing a small snippet to show how easy (and possible) it is to make older browsers support HTML5 form features.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.standardista.com/html5-placeholder-attribute-script/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Mobile Web Application Development: HTML5 and CSS3 for Android &amp; iPhone</title>
		<link>http://www.standardista.com/mobile-html5-css3-web-development-android-iphone/</link>
		<comments>http://www.standardista.com/mobile-html5-css3-web-development-android-iphone/#comments</comments>
		<pubDate>Tue, 26 Oct 2010 03:24:14 +0000</pubDate>
		<dc:creator>Estelle Weyl</dc:creator>
				<category><![CDATA[css3]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[iphone]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.standardista.com/?p=414</guid>
		<description><![CDATA[Introduction to mobile web application development -- using HTML5 and CSS3 -- for mobile. Learn how to target mobile devices, including iPad, iPhone and Android.]]></description>
			<content:encoded><![CDATA[<p>Introduction to mobile web application development &#8212; using HTML5 and CSS3 &#8212; for mobile. Learn how to target mobile devices, including iPad, iPhone and Android.</p>
<div style="width:425px" id="__ss_4965824"><strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/estellevw/web-development-for-mobile" title="Web Development for Mobile: GTUG Talk at Google">Mobile Web Application Development: CSS3 and HTML5 for Webkit</a></strong><object id="__sse4965824" width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=gtugphone-100813164810-phpapp02&#038;stripped_title=web-development-for-mobile&#038;userName=estellevw" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed name="__sse4965824" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=gtugphone-100813164810-phpapp02&#038;stripped_title=web-development-for-mobile&#038;userName=estellevw" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object>
<div style="padding:5px 0 12px">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/estellevw">estellevw</a>.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.standardista.com/mobile-html5-css3-web-development-android-iphone/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Introduction to GeoLocation</title>
		<link>http://www.standardista.com/introduction-to-geolocation/</link>
		<comments>http://www.standardista.com/introduction-to-geolocation/#comments</comments>
		<pubDate>Sun, 15 Aug 2010 05:49:40 +0000</pubDate>
		<dc:creator>Estelle Weyl</dc:creator>
				<category><![CDATA[HTML5]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[geolocation]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.standardista.com/?p=384</guid>
		<description><![CDATA[Geolocation allows users to share their physical location with your application if they choose to. Especially useful in social networking, geo tagging, and mapping, but applicable to any type of application, geolocation enables developers to enhance the user experience, making content, social graphs and advertisements more relevant to the location of the user. Learn the basic JavaScript to determine your user's location.]]></description>
			<content:encoded><![CDATA[<p>Geolocation allows users to share their physical location with your application if they choose to. Especially useful in social networking, geo tagging, and mapping, but applicable to any type of application, geolocation enables developers to enhance the user experience, making content, social graphs and advertisements more relevant to the location of the user.</p>
<p>The browser will request the permission of the user before accessing geolocation information. Geolocation is an opt in feature: when your web application requests Geolocation information, mobile browsers create an alert, and the desktop browser asks via banner that pops up at the top of the browser window asking permission to access location information. The user can grant permission or deny it, and optionally remember the choice on that site. If permission is granted, the Geolocation information will be accessible to your scripts and any third party scripts included in the page, letting your application determine the location of the user, and maintain location as the user moves around.</p>
<p>Location information is approximate, not exact, being garnered from IP addresses, cell towers, Wi-Fi networks, GPS, or even getting the information through manual data entry by the user.  The geolocation API does not care how the client determines location as long as the data is received in a staddard way. Because determining location can take time, the geolocation API is asynchronous.</p>
<p>To determing browser support for geolocation use:</p>
<pre><em>if(navigator.geolocation)</em> {
   //geolocation is supported
}</pre>
<p>The geolocation object provides for the <em>getCurrentPosition()</em> method that asynchronously returns the user&#8217;s current location.</p>
<pre><em>if(navigator.geolocation) {</em>
<em>   navigator.geolocation.getCurrentPosition(handle_success, handle_errors);</em>
<em>}</em></pre>
<p>If successful, the callback function will return the current <em>position</em> with the <em>coords</em> property contains the more common <em>latitude</em> and <em>longitude</em> properties as well as the <em>altitude</em>, <em>accuracy</em>, <em>altitudeAccuracy</em>, <em>heading</em> and <em>speed</em> properties. The following script will return the alert the current latitude and longitude, and is available in the chapter files:</p>
<pre><em>if(navigator.geolocation) {</em>
<em> navigator.geolocation.getCurrentPosition(handle_success,handle_errors); </em>
<em> </em>
<em>function handle_success(position){ </em>
<em> alert('Latitude: ' + position.coords.latitude + '\n Longitude: ' + position.coords.latitude); </em>
<em> }</em>
<em> </em>
<em> function handle_errors(err) </em><em>{ </em>
<em> switch(err.code) </em>
<em>    { </em>
<em>   case err.PERMISSION_DENIED: alert("User refused to share geolocation data"); </em>
<em>   break; </em>
<em> </em>
<em>   case err.POSITION_UNAVAILABLE: alert("Current position is unavailable"); </em>
<em>   break; </em>
<em> </em>
<em>   case err.TIMEOUT: alert("Timed out"); </em>
<em>   break; </em>
<em> </em>
<em>   default: alert("Unknown error"); </em>
<em>   break; </em>
<em>  }</em>
<em> } </em>

<em> </em>

<em>}</em>
</pre>
<p>The draft specification can be found at <a href="http://dev.w3.org/geo/api/spec-source.html#geolocation_interface">http://dev.w3.org/geo/api/spec-source.html#geolocation_interface</a>. Geolocation is support in Firefox, Webkit and Opera, but not IE. It is anticipated that it will be supported in IE9.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.standardista.com/introduction-to-geolocation/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Served from: www.standardista.com @ 2012-05-17 13:40:46 -->
