<?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>HTML 5 Tutorial &#187; Tutorials</title>
	<atom:link href="http://html5tutorial.net/category/tutorials/feed" rel="self" type="application/rss+xml" />
	<link>http://html5tutorial.net</link>
	<description>Tutorials, Tips &#38; News for the Designer</description>
	<lastBuildDate>Sat, 24 Jul 2010 09:48:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Working with HTML5 localStorage()</title>
		<link>http://html5tutorial.net/tutorials/working-with-html5-localstorage.html</link>
		<comments>http://html5tutorial.net/tutorials/working-with-html5-localstorage.html#comments</comments>
		<pubDate>Tue, 11 May 2010 09:41:40 +0000</pubDate>
		<dc:creator>editor</dc:creator>
				<category><![CDATA[Examples]]></category>
		<category><![CDATA[HTML 5 Attributes]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[html5 localstorage()]]></category>
		<category><![CDATA[localStorage()]]></category>

		<guid isPermaLink="false">http://html5tutorial.net/?p=397</guid>
		<description><![CDATA[HTML5 is fast approaching and getting wide spread usage. Most are familiar with the new tags like header, section and footer and everybody is aware of the new video tags thanks to Apple vs Adobe. However, there is a lot more to HTML5 those just those two aspects. I want to focus on localStorage() this [...]]]></description>
			<content:encoded><![CDATA[<p>HTML5 is fast approaching and getting wide spread usage. Most are familiar with the new tags like header, section and footer and everybody is aware of the new video tags thanks to Apple vs Adobe. However, there is a lot more to HTML5 those just those two aspects.</p>
<p>I want to focus on <a href="http://dev.w3.org/html5/webstorage/#the-localstorage-attribute" target="_blank">localStorage()</a> this time. localStorage is a client-side key-value database, meaning it is stored in the users browser. This means the users data is saved on their machine inside their browser. This also means that their data is only available to them when on that machine and in that browser. Remember that localStorage is per browser not per computer.</p>
<p>Browser support is always a huge topic when discussing new html5 or even css3 aspects. This is due to such a wide spread of support from the big browsers right now. In the case of localStorage, it is supported by Safari 4+, Mobile Safari (iPhone/iPad), Firefox 3.5+, Internet Explorer 8+ and Chrome 4+. This only leaves out Opera who currently does not support this storage. Depending on your target audience browser support may be an issue for you.</p>
<p><a href="http://paperkilledrock.com/2010/05/html5-localstorage-part-one/" target="_blank">HTML5 localStorage()</a> is a four part series of articles where I will show you how to create a simple html5 time tracking web app using localStorage as the sole database. The series will walk you through the basics of localStorage to advanced techniques to leverage the power of this new html5 database. We won&#8217;t stop at just the functionality of the app but in part four we will cover styling the app with html5 and css3 to create an iPhone(ish) web app.</p>
<p>Here is a quick example of what the javascript looks like to access localStorage();</p>
<div class='stb-alert_box' ><br />
if (typeof(localStorage) == &#8216;undefined&#8217; ) {<br />
alert(&#8216;Your browser does not support HTML5 localStorage. Try upgrading.&#8217;);<br />
} else {<br />
try {<br />
localStorage.setItem(&#8220;name&#8221;, &#8220;Hello World!&#8221;); //saves to the database, &#8220;key&#8221;, &#8220;value&#8221;<br />
} catch (e) {<br />
if (e == QUOTA_EXCEEDED_ERR) {<br />
alert(&#8216;Quota exceeded!&#8217;); //data wasn&#8217;t successfully saved due to quota exceed so throw an error<br />
}<br />
}</p>
<p>document.write(localStorage.getItem(&#8220;name&#8221;)); //Hello World!<br />
localStorage.removeItem(&#8220;name&#8221;); //deletes the matching item from the database<br />
}<br />
</div>
<p>In the code snippet above we are doing several things including checking if your browser supports localStorage, saving a new item to the database, retrieving that item and displaying it and then removing the item. The above is your typical Hello World example but shows you just how easy it is to use. The time tracking app we will create will be storing a unique id as the key and joining multiple values into one string, as localStorage only supports storing of strings. I will be making the source code available at the end of each article along with the full source and the working app at the end of the series, <a href="http://paperkilledrock.com/2010/05/html5-localstorage-part-one/" target="_blank">which you can follow here</a>.</p>
<p>&#8221; Written for HTML5Tutorial.net by <a href="http://jamesfleeting.com" target="_blank">James Fleeting</a>, a web designer and developer obsessed with the future of the web working at Crane | West Advertising Agency in Wichita Falls, Texas. &#8220;</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://html5tutorial.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://html5tutorial.net/tutorials/working-with-html5-localstorage.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>html5 monitoring</title>
		<link>http://html5tutorial.net/tutorials/html5-monitoring.html</link>
		<comments>http://html5tutorial.net/tutorials/html5-monitoring.html#comments</comments>
		<pubDate>Wed, 02 Sep 2009 17:44:04 +0000</pubDate>
		<dc:creator>editor</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[html5 monitoring]]></category>
		<category><![CDATA[Network monitoring]]></category>

		<guid isPermaLink="false">http://html5tutorial.net/?p=81</guid>
		<description><![CDATA[Here is another impressive HTML5 example, while its not exactly advanced it does show demonstrate the raw power of HTML 5. This could also be used as a Windows Vista desktop widget or even for Windows 7 once it is released. This code could be changed to check the status of your domains. (Please test [...]]]></description>
			<content:encoded><![CDATA[<p>Here is another impressive HTML5 example, while its not exactly advanced it does show demonstrate the raw power of HTML 5. This could also be used as a Windows Vista desktop widget or even for Windows 7 once it is released. This code could be changed to check the status of your domains. (Please test this out by disabling your internet connect either unplug your network cable, or go into &#8220;Work Offline&#8221; with your browser)</p>
<p> </p>
<p><strong>Please click &#8220;Read More&#8221; to see the full HTML5 code</strong><span id="more-81"></span>.</p>
<p>To render what you see above you will need the following code:<br />
<code>[stextbox id=&quot;alert&quot; caption=&quot;Status monitoring&quot; color=&quot;ffffff&quot; ccolor=&quot;ffffff&quot;]</code>Network monitoring:</p>
<p>&lt;code&lt;&lt;!DOCTYPE html&gt;&lt;/code&gt;<br />
&lt;html lang=&#8221;en&#8221; xmlns=&#8221;http://www.w3.org/1999/xhtml&#8221;&gt;<br />
&lt;head&gt;<br />
&lt;meta http-equiv=&#8221;Content-Type&#8221; content=&#8221;text/html;charset=utf-8&#8243; /&gt;<br />
&lt;title&gt;HTML5 Demo: online connectivity monitoring&lt;/title&gt;<br />
&lt;style&gt;<br />
body {<br />
font: normal 16px/20px Helvetica, sans-serif;<br />
background: #F4F4F4;<br />
margin: 0;<br />
margin-top: 40px;<br />
padding: 0;<br />
}</p>
<p>section, header, footer {<br />
display: block;<br />
}</p>
<p>#wrapper {<br />
width: 550px;<br />
margin: 0 auto;<br />
background: #fff;<br />
-moz-border-radius: 10px;<br />
-webkit-border-radius: 10px;<br />
border-top: 1px solid #fff;<br />
padding-bottom: 76px;<br />
}</p>
<p>h1 {<br />
padding-top: 10px;<br />
}</p>
<p>h2 {<br />
font-size: 100%;<br />
font-style: italic;<br />
}</p>
<p>header,<br />
article &gt; p,<br />
article &gt; h3,<br />
article &gt; code,<br />
footer a,<br />
footer p {<br />
margin: 20px;<br />
}</p>
<p>footer &gt; * {<br />
margin: 20px;<br />
color: #999;<br />
}</p>
<p>#status {<br />
padding: 5px;<br />
color: #fff;<br />
background: #ccc;<br />
}</p>
<p>#status.offline {<br />
background: #c00;<br />
}</p>
<p>#status.online {<br />
background: #0c0;<br />
}</p>
<p>&lt;/style&gt;<br />
&lt;script&gt;<br />
// For discussion and comments, see: http://remysharp.com/2009/01/07/html5-enabling-script/<br />
(function(){if(!/*@cc_on!@*/0)return;var e = &#8220;abbr,article,aside,audio,bb,canvas,datagrid,datalist,details,dialog,eventsource,figure,footer,header,mark,menu,meter,nav,output,progress,section,time,video&#8221;.split(&#8216;,&#8217;),i=e.length;while (i&#8211;){document.createElement(e[i])}})()<br />
&lt;/script&gt;<br />
&lt;script&gt;<br />
function online() {<br />
var status = document.querySelector(&#8216;#status&#8217;);<br />
if (status) {<br />
status.className = navigator.onLine ? &#8216;online&#8217; : &#8216;offline&#8217;;<br />
status.innerHTML = navigator.onLine ? &#8216;online&#8217; : &#8216;offline&#8217;;<br />
}<br />
}</p>
<p>document.addEventListener(&#8216;DOMContentLoaded&#8217;, online, true);<br />
window.addEventListener(&#8216;online&#8217;, online, true);<br />
window.addEventListener(&#8216;offline&#8217;, online, true);</p>
<p>&lt;/script&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;section id=&#8221;wrapper&#8221;&gt;<br />
&lt;header&gt;</p>
<p>&lt;h1&gt;Status Monitoring&lt;/h1&gt;<br />
&lt;/header&gt;<br />
&lt;article&gt;<br />
&lt;p&gt;Current network status: &lt;span id=&#8221;status&#8221;&gt;checking&#8230;&lt;/span&gt;&lt;/p&gt;<br />
&lt;/article&gt;<br />
&lt;footer&gt;&lt;a href=&#8221;http:html5tutorials.net/&#8221;&gt;HTML5 Tutorial&lt;/a&gt;&lt;/footer&gt;<br />
&lt;/section&gt;</p>
<p>&lt;script&gt;<br />
var gaJsHost = ((&#8220;https:&#8221; == document.location.protocol) ? &#8220;https://ssl.&#8221; : &#8220;http://www.&#8221;);<br />
document.write(unescape(&#8220;%3Cscript src=&#8217;&#8221; + gaJsHost + &#8220;google-analytics.com/ga.js&#8217; type=&#8217;text/javascript&#8217;%3E%3C/script%3E&#8221;));<br />
&lt;/script&gt;<br />
&lt;script&gt;<br />
try {<br />
var pageTracker = _gat._getTracker(&#8220;UA-1656750-18&#8243;);<br />
pageTracker._trackPageview();<br />
} catch(err) {}&lt;/script&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;<code>[/stextbox]</code></p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://html5tutorial.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://html5tutorial.net/tutorials/html5-monitoring.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drag and drop</title>
		<link>http://html5tutorial.net/tutorials/drag-and-drop.html</link>
		<comments>http://html5tutorial.net/tutorials/drag-and-drop.html#comments</comments>
		<pubDate>Wed, 02 Sep 2009 17:03:35 +0000</pubDate>
		<dc:creator>editor</dc:creator>
				<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://html5tutorial.net/?p=58</guid>
		<description><![CDATA[As we have mentioned in some of our previous articles &#38; tutorials HTML 5 offers designers, developers and people in general a much richer experience, we are still just scraping the surface of the new markup, so today we are going to have a look at how to create a HTML 5 page that uses [...]]]></description>
			<content:encoded><![CDATA[<p>As we have mentioned in some of our previous articles &amp; tutorials HTML 5 offers designers, developers and people in general a much richer experience, we are still just scraping the surface of the new markup, so today we are going to have a look at how to create a <a href="http://html5tutorial.net/examples/html5-drag-and-drop.html" target="_blank">HTML 5 page that uses the new drag and drop feature</a>. Note we are displaying this via an iframe so if your having any trouble viewing the demo please let us know, another reason it may not show will be due to your browser, this is working in the latest Firefox browser only at the moment..</p>
<p><span id="more-58"></span><br />
<strong>Basic HTML 5 layout code:</strong></p>
<p>&lt;!DOCTYPE HTML&gt;<br />
&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;meta content=&#8221;text/html; charset=UTF-8&#8243; http-equiv=&#8221;content-type&#8221;/&gt;<br />
&lt;center&gt;&lt;title&gt;HTML5 Drag and drop demonstration&lt;/title&gt;<br />
&lt;style type=&#8221;text/css&#8221;&gt;<br />
#boxA, #boxB, #boxC {<br />
float:left; width:165px; height:165px; padding:10px; margin:10px;<br />
}</p>
<p>#boxA { background-color: #474747; }<br />
#boxB { background-color: #474747; }<br />
#boxC { background-color: #474747; }</p>
<p>#drag, #drag2, #drag3 {<br />
width:30px; height:30px; padding:5px; margin:5px;<br />
-moz-user-select:none;<br />
}<br />
#drag { background-color: #e8e8e8;}<br />
#drag2 { background-color: orange;}<br />
#drag3 { background-color: purple; border:3px brown solid;}</p>
<p>&lt;/style&gt;<br />
&lt;script type=&#8221;text/javascript&#8221;&gt;<br />
function dragStart(ev) {<br />
ev.dataTransfer.effectAllowed=&#8217;move&#8217;;<br />
//ev.dataTransfer.dropEffect=&#8217;move&#8217;;<br />
ev.dataTransfer.setData(&#8220;Text&#8221;, ev.target.getAttribute(&#8216;id&#8217;));<br />
ev.dataTransfer.setDragImage(ev.target,0,0);<br />
return true;<br />
}</p>
<p>function dragEnter(ev) {<br />
var idelt = ev.dataTransfer.getData(&#8220;Text&#8221;);<br />
return true;<br />
}</p>
<p>function dragOver(ev) {<br />
var idelt = ev.dataTransfer.getData(&#8220;Text&#8221;);<br />
var id = ev.target.getAttribute(&#8216;id&#8217;);<br />
if( (id ==&#8217;boxB&#8217; || id ==&#8217;boxA&#8217;) &amp;&amp; (idelt == &#8216;drag&#8217; || idelt==&#8217;drag2&#8242;))<br />
return false;<br />
else if( id ==&#8217;boxC&#8217; &amp;&amp; idelt == &#8216;drag3&#8242;)<br />
return false;<br />
else<br />
return true;<br />
}</p>
<p>function dragEnd(ev) {<br />
ev.dataTransfer.clearData(&#8220;Text&#8221;);<br />
return true<br />
}</p>
<p>function dragDrop(ev) {<br />
var idelt = ev.dataTransfer.getData(&#8220;Text&#8221;);<br />
ev.target.appendChild(document.getElementById(idelt));<br />
ev.stopPropagation();<br />
return false; // return false so the event will not be propagated to the browser<br />
}</p>
<p>&lt;/script&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
&lt;h1&gt;Drag and drop HTML5 demo&lt;/h1&gt;<br />
&lt;div&gt;there are many other variables that can be used also, we will coer this another day.<br />
&lt;/div&gt;</p>
<p>&lt;div id=&#8221;boxA&#8221;<br />
ondragenter=&#8221;return dragEnter(event)&#8221;<br />
ondrop=&#8221;return dragDrop(event)&#8221;<br />
ondragover=&#8221;return dragOver(event)&#8221;&gt;</p>
<p>&lt;div id=&#8221;drag&#8221; draggable=&#8221;true&#8221;<br />
ondragstart=&#8221;return dragStart(event)&#8221;<br />
ondragend=&#8221;return dragEnd(event)&#8221;&gt;drag me&lt;/div&gt;</p>
<p>&lt;div id=&#8221;drag2&#8243; draggable=&#8221;true&#8221;<br />
ondragstart=&#8221;return dragStart(event)&#8221;<br />
ondragend=&#8221;return dragEnd(event)&#8221;&gt;drag me&lt;/div&gt;</p>
<p>&lt;div id=&#8221;drag3&#8243; draggable=&#8221;true&#8221;<br />
ondragstart=&#8221;return dragStart(event)&#8221;<br />
ondragend=&#8221;return dragEnd(event)&#8221;&gt;drag me&lt;/div&gt;</p>
<p>&lt;/div&gt;</p>
<p>&lt;div id=&#8221;boxB&#8221;<br />
ondragenter=&#8221;return dragEnter(event)&#8221;<br />
ondrop=&#8221;return dragDrop(event)&#8221;<br />
ondragover=&#8221;return dragOver(event)&#8221;&gt;<br />
&lt;/div&gt;</p>
<p>&lt;div id=&#8221;boxC&#8221;<br />
ondragenter=&#8221;return dragEnter(event)&#8221;<br />
ondrop=&#8221;return dragDrop(event)&#8221;<br />
ondragover=&#8221;return dragOver(event)&#8221;&gt;<br />
&lt;/div&gt;<br />
&lt;div style=&#8221;clear:both&#8221;&gt;Example created by &lt;a href=&#8221;http://html5tutorial.net/&#8221;&gt;HTML Tutorials&lt;/a&gt;.&lt;/div&gt;<br />
&lt;/body&gt;&lt;/center&gt;<br />
&lt;/html&gt;</p>
<p>We will cover JavaScript in depth at a later date, for now copy and paste the code above and have a play around with it and see what you can come up with, this was more or less an example to demonstrate HTML5&#8242;s tremendous power.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://html5tutorial.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://html5tutorial.net/tutorials/drag-and-drop.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Basic HTML 5 layout</title>
		<link>http://html5tutorial.net/tutorials/basic-html-5-layout.html</link>
		<comments>http://html5tutorial.net/tutorials/basic-html-5-layout.html#comments</comments>
		<pubDate>Wed, 02 Sep 2009 07:27:25 +0000</pubDate>
		<dc:creator>editor</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Basic HTML 5 layout]]></category>

		<guid isPermaLink="false">http://html5tutorial.net/?p=11</guid>
		<description><![CDATA[Today we are going to have a quick look into the layout of HTML 5, we have put together a very basic HTML 5 page so that you can get a rough idea of what to expect from the upcoming code. (Example currently undergoing an update, sign up to our rss feed to be notified [...]]]></description>
			<content:encoded><![CDATA[<p>Today we are going to have a quick look into the layout of HTML 5, we have put together a <strong>very basic</strong> HTML 5 page so that you can get a rough idea of what to expect from the upcoming code.</p>
<p><span style="color: #800000;"><strong>(Example currently undergoing an update, sign up to our <a href="http://feeds2.feedburner.com/Html5Tutorial" target="_blank">rss feed</a> to be notified of it&#8217;s completion, it will be fantastic!)</strong></span></p>
<p>As you can see it is a very basic page, however you will need to start from the bottom with HTML 5 as it varies quite a lot from the old HTML 4 code reference.</p>
<p><span id="more-11"></span></p>
<p>Currently the only browser to fully support HTML 5 reference code is Safari you can download it <a title="Safari download" href="http://www.apple.com/safari/" target="_blank">HERE</a>.</p>
<p>Make sure you bookmark our website, we are in the process of putting together more HTML 5 tutorials.</p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save"><img src="http://html5tutorial.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://html5tutorial.net/tutorials/basic-html-5-layout.html/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
