<?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; HTML 5 Attributes</title>
	<atom:link href="http://html5tutorial.net/category/html-5-attributes/feed" rel="self" type="application/rss+xml" />
	<link>http://html5tutorial.net</link>
	<description>Tutorials, Tips &#38; News for the Designer</description>
	<lastBuildDate>Thu, 08 Dec 2011 15:15:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</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>the 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 id='stb-box-9526' 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 a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fhtml5tutorial.net%2Ftutorials%2Fworking-with-html5-localstorage.html&amp;title=Working%20with%20HTML5%20localStorage%28%29" id="wpa2a_2"><img src="http://html5tutorial.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="share save 171 16 Working with HTML5 localStorage()"  title="Working with HTML5 localStorage()" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://html5tutorial.net/tutorials/working-with-html5-localstorage.html/feed</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>HTML 5 Attributes</title>
		<link>http://html5tutorial.net/html-5-attributes/html-5-attributes.html</link>
		<comments>http://html5tutorial.net/html-5-attributes/html-5-attributes.html#comments</comments>
		<pubDate>Wed, 02 Sep 2009 10:51:55 +0000</pubDate>
		<dc:creator>the Editor</dc:creator>
				<category><![CDATA[HTML 5 Attributes]]></category>

		<guid isPermaLink="false">http://html5tutorial.net/?p=40</guid>
		<description><![CDATA[Below is a complete list of HTML 5 attributes, as we mentioned in our HTML 5 Reference article we will be providing a downloadable HTML 5 Attributes cheat sheet in the coming days. 4* The element is defined in HTML 4+ 5* The element is defined in HTML 5 Attribute Value Description 4 5 accesskey [...]]]></description>
			<content:encoded><![CDATA[<p>Below is a complete list of HTML 5 attributes, as we mentioned in our HTML 5 Reference article we will be providing a downloadable HTML 5 Attributes cheat sheet in the coming days.</p>
<ul>
<li><strong>4* The element is defined in HTML 4+</strong></li>
<li><strong>5* The element is defined in HTML 5</strong></li>
</ul>
<p><strong><span id="more-40"></span></strong></p>
<table class="reference" border="1" cellspacing="0" cellpadding="0" width="100%">
<tbody>
<tr>
<th align="left" valign="top">Attribute</th>
<th align="left" valign="top">Value</th>
<th align="left" valign="top">Description</th>
<th width="5%" align="left" valign="top">4</th>
<th width="5%" align="left" valign="top">5</th>
</tr>
<tr>
<td valign="top"><strong>accesskey</strong></td>
<td valign="top"><em>character</em></td>
<td valign="top">Specifies a keyboard shortcut to access an element</td>
<td valign="top">4</td>
<td valign="top"> </td>
</tr>
<tr>
<td valign="top"><strong>class</strong></td>
<td valign="top"><em>classname</em></td>
<td valign="top">Specifies a classname for an element (used to specify a class in<br />
a style sheet)</td>
<td valign="top">4</td>
<td valign="top">5</td>
</tr>
<tr>
<td valign="top"><strong>contenteditable</strong></td>
<td valign="top">true<br />
false</td>
<td valign="top">Specifies whether or not a user is allowed to edit the content</td>
<td valign="top"> </td>
<td valign="top">5</td>
</tr>
<tr>
<td valign="top"><strong>contextmenu</strong></td>
<td valign="top"><em>menu_id</em></td>
<td valign="top">Specifies the context menu for an element</td>
<td valign="top"> </td>
<td valign="top">5</td>
</tr>
<tr>
<td valign="top"><strong>dir</strong></td>
<td valign="top">ltr<br />
rtl</td>
<td valign="top">Specifies the text direction<br />
for the content in an element</td>
<td valign="top">4</td>
<td valign="top">5</td>
</tr>
<tr>
<td valign="top"><strong>draggable</strong></td>
<td valign="top">true<br />
false<br />
auto</td>
<td valign="top">Specifies whether or not a user is allowed to drag an element</td>
<td valign="top"> </td>
<td valign="top">5</td>
</tr>
<tr>
<td valign="top"><strong>id</strong></td>
<td valign="top"><em>id</em></td>
<td valign="top">Specifies a unique id for an element</td>
<td valign="top">4</td>
<td valign="top">5</td>
</tr>
<tr>
<td valign="top"><strong>irrelevant</strong></td>
<td valign="top">true<br />
false</td>
<td valign="top">Specifies whether or not a element is irrelevant. An irrelevant<br />
element is<br />
not displayed</td>
<td valign="top"> </td>
<td valign="top">5</td>
</tr>
<tr>
<td valign="top"><strong>lang</strong></td>
<td valign="top"><em>language_code</em></td>
<td valign="top">Specifies a language code for the content in an element</td>
<td valign="top">4</td>
<td valign="top">5</td>
</tr>
<tr>
<td valign="top"><strong>ref</strong></td>
<td valign="top"><em>URL / id</em></td>
<td valign="top">Specifies a reference to another document / another part of a document<br />
(use only if the template attribute is set)</td>
<td valign="top"> </td>
<td valign="top">5</td>
</tr>
<tr>
<td valign="top"><strong>registrationmark</strong></td>
<td valign="top"><em>reg_mark</em></td>
<td valign="top">Specifies a registration mark for an element</td>
<td valign="top"> </td>
<td valign="top">5</td>
</tr>
<tr>
<td valign="top"><strong>style</strong></td>
<td valign="top"><em>style_definition</em></td>
<td valign="top">Specifies an inline style for an element</td>
<td valign="top">4</td>
<td valign="top">5</td>
</tr>
<tr>
<td valign="top"><strong>tabindex</strong></td>
<td valign="top"><em>number</em></td>
<td valign="top">Specifies the tab order of an element</td>
<td valign="top">4</td>
<td valign="top">5</td>
</tr>
<tr>
<td valign="top"><strong>template</strong></td>
<td valign="top"><em>URL / id</em></td>
<td valign="top">Specifies a reference to another document / another part of the document<br />
that should be applied to an element</td>
<td valign="top"> </td>
<td valign="top">5</td>
</tr>
<tr>
<td valign="top"><strong>title</strong></td>
<td valign="top"><em>text</em></td>
<td valign="top">Specifies extra information about an element</td>
<td valign="top">4</td>
<td valign="top">5</td>
</tr>
</tbody>
</table>
<p>The above list is only a Standard Attribute list, if and when more HTML Attributes become available we will update this article.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fhtml5tutorial.net%2Fhtml-5-attributes%2Fhtml-5-attributes.html&amp;title=HTML%205%20Attributes" id="wpa2a_4"><img src="http://html5tutorial.net/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="share save 171 16 HTML 5 Attributes"  title="HTML 5 Attributes" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://html5tutorial.net/html-5-attributes/html-5-attributes.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

