<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Data Element on HTML5 in 24 Hours</title>
    <link>https://www.html5in24hours.com/tags/data-element/</link>
    <description>Data Element on HTML5 in 24 Hours</description>
    <generator>Hugo</generator>
    <language>en-us</language><copyright>Jennifer Kyrnin</copyright><lastBuildDate>Thu, 03 Nov 2011 00:03:32 +0000</lastBuildDate>
    <atom:link href="https://www.html5in24hours.com/tags/data-element/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>The TIME Element Has Been Removed in Favor of DATA</title>
      <link>https://www.html5in24hours.com/posts/the-time-element-has-been-removed-in-favor-of-data/</link>
      <pubDate>Thu, 03 Nov 2011 00:03:32 +0000</pubDate>
      <guid>https://www.html5in24hours.com/posts/the-time-element-has-been-removed-in-favor-of-data/</guid><description>&lt;p&gt;As of October 29th there is a new element in HTML5: &lt;code&gt;DATA&lt;/code&gt;. The &lt;code&gt;DATA&lt;/code&gt; element is for defining content that has both human- and computer-readable data. Some examples of this are:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Dates and times&lt;/li&gt;&#xA;&lt;li&gt;Numbers&lt;/li&gt;&#xA;&lt;li&gt;Colors&lt;/li&gt;&#xA;&lt;li&gt;Money&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Each of these can be written in a way that a human will understand, while a computer might not. For example, a date can be written December 16th, Dec 16, 12/16/11, 16 December, and many other ways. While it is possible to teach computers to know that all those things are dates and what they meant. So you can set the value of a date on a data element with a standard format that computers can read.&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;data value=“2011-12-16”&amp;gt;December 16th&amp;lt;/data&amp;gt;&lt;/code&gt;&lt;/p&gt;&#xA;&lt;p&gt;With the &lt;code&gt;DATA&lt;/code&gt; element and its required attribute &lt;code&gt;value&lt;/code&gt; you can define data for microformats and microdata as well as for scripts on your web page. The content displays in a format that humans appreciate and the &lt;code&gt;value&lt;/code&gt; attribute has the content in a format that computers can read and use.&lt;/p&gt;&#xA;&lt;h3 id=&#34;the-data-element-replaces-the-time-element&#34;&gt;The &lt;code&gt;DATA&lt;/code&gt; Element Replaces the &lt;code&gt;TIME&lt;/code&gt; Element&lt;/h3&gt;&#xA;&lt;p&gt;In the same revision to the HTML5 specification that brought us the &lt;code&gt;DATA&lt;/code&gt; element, it also removed the &lt;code&gt;TIME&lt;/code&gt; element from the specification. While you might be disappointed, this is really a good thing. The &lt;code&gt;TIME&lt;/code&gt; element was limited only to date and time formats and as such had a limited scope. With the &lt;code&gt;DATA&lt;/code&gt; element you can mark up all sorts of things that can be defined in both human- and computer-readable formats, you are not just limited to dates and times.&lt;/p&gt;&#xA;&lt;h3 id=&#34;how-this-affects-the-book&#34;&gt;How This Affects the Book&lt;/h3&gt;&#xA;&lt;p&gt;I submitted my final revision of the book on October 25, 2011—four days before this change went into effect. The book covers the &lt;code&gt;TIME&lt;/code&gt; element, but does not include the &lt;code&gt;DATA&lt;/code&gt; element.&lt;/p&gt;&#xA;</description>
    </item>
  </channel>
</rss>
