{"id":1551,"date":"2016-06-18T06:56:41","date_gmt":"2016-06-18T06:56:41","guid":{"rendered":"http:\/\/www.capitalnumbers.com\/blog\/?p=1551"},"modified":"2025-08-11T11:29:54","modified_gmt":"2025-08-11T11:29:54","slug":"an-advanced-guide-to-html-5-features","status":"publish","type":"post","link":"https:\/\/www.capitalnumbers.com\/blog\/an-advanced-guide-to-html-5-features\/","title":{"rendered":"An Advanced Guide to HTML 5 Features"},"content":{"rendered":"<p><!--<img class=\"aligncenter size-full wp-image-1566\" src=\"http:\/\/www.capitalnumbers.com\/blog\/wp-content\/uploads\/2016\/06\/CN_Blog_HTML5_18-06-16-1.jpg\" alt=\"CN_Blog_HTML5_18-06-16 (1)\" width=\"1200\" height=\"638\" srcset=\"https:\/\/www.capitalnumbers.com\/blog\/wp-content\/uploads\/2016\/06\/CN_Blog_HTML5_18-06-16-1.jpg 1200w, https:\/\/www.capitalnumbers.com\/blog\/wp-content\/uploads\/2016\/06\/CN_Blog_HTML5_18-06-16-1-300x160.jpg 300w, https:\/\/www.capitalnumbers.com\/blog\/wp-content\/uploads\/2016\/06\/CN_Blog_HTML5_18-06-16-1-768x408.jpg 768w, https:\/\/www.capitalnumbers.com\/blog\/wp-content\/uploads\/2016\/06\/CN_Blog_HTML5_18-06-16-1-1024x544.jpg 1024w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/>--><\/p>\n<p><span style=\"font-weight: 400;\">The fact that HTML5 is powerful with a wider set of technologies that allows development of more diverse and powerful websites and applications isn\u2019t in doubt. Therefore, knowing how to use these features is the first step towards becoming an efficient web developer. This blog post walks you through a comprehensive list of new features in HTML5 that are necessary to make you an efficient web developer. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">Are you set to go?<\/span><\/p>\n<h6><span style=\"color: #003366;\">#1: New semantics<\/span><\/h6>\n<p>New elements have been added to HTML5. Knowing how to use the semantics\u2014with the new HTML5 elements\u2014will provide you with the knowledge that describes with precision how your content should look like. Some of these elements are:<\/p>\n<p>* &lt;mark&gt;. It\u2019s used to show highlighted text. For instance, the code below demonstrates how you can use this element:<\/p>\n<pre>&lt;p&gt;&lt;strong&gt;the mark element is used to &lt;mark&gt;highlight&lt;\/mark&gt; text&lt;\/strong&gt;&lt;\/p&gt;<\/pre>\n<p>* &lt;figure&gt;. It shows a self-contained content. This element is frequently used with the caption (&lt;figcaption&gt;) element, where it\u2019s referenced as a single unit. Here\u2019s an example:<\/p>\n<pre>&lt;figure&gt;\n&lt;img src= \u201chttps:\/\/www.capitalnumbers.com\/media\/ourlogo-sm.jpeg\u201d alt=\"Capital Numbers\u201d&gt;\n&lt;figcaption&gt;Capital Number Logo&lt;\/figcaption&gt;\n&lt;\/figure&gt;<\/pre>\n<p>* &lt;data&gt;. The data element in HTML5. It\u2019s used to link a given HTML content with a machine-readable translation system. When the HTML content is time or even date-related, then the &lt;time&gt; element is used. Here\u2019s an example:<\/p>\n<pre>&lt;ul&gt;\n&lt;li&gt;&lt;data value= \u201c67400\u201d&gt;Mombasa&lt;\/data&gt;&lt;\/li&gt;\n&lt;li&gt;&lt;data value= \u201c67401\"&gt;Nairobi&lt;\/data&gt;&lt;\/li&gt;\n&lt;\/ul&gt;<\/pre>\n<p>* &lt;output&gt;. It displays the result of a calculation or a user\u2019s action. Here\u2019s an example when used in a form:<\/p>\n<pre>&lt;form oninput= \u201canswer. Value=parseInt (m.value) +parseInt (n.value)\u201d&gt;\n&lt;input type= \u201cnumber\u201d name= \u201cm\u201d value= \u201c100\u201d \/&gt; +\n&lt;input type= \u201cnumber\u201d name= \u201cn\u201d value= \u201c250\u201d \/&gt; =\n&lt;output name= \u201canswer\u201d&gt;350&lt;\/output&gt;\n&lt;\/form&gt;<\/pre>\n<p><em>In the above example 350 is a value shown as an example which will basically vary depending on the calculations or functions implemented.<\/em><\/p>\n<p>* &lt;progress&gt;. It\u2019s used to display the completion progress of a given task. Here\u2019s how you can use this element:<\/p>\n<pre>&lt;progress value= \u201c60\u201d max= \u201c100\u201d&gt;85&lt;\/progress&gt;<\/pre>\n<p>Apart from other attributes &lt;progress&gt; has two specific attributes \u201cmax\u201d and \u201cvalue\u201d.<br \/>\n<strong>Max<\/strong> indicates how much task needs to be done before it is considered as complete<br \/>\n<strong>Value<\/strong> indicates the current status of the progress bar.<\/p>\n<p>* &lt;meter&gt;. It represents a scalar number that\u2019s contained within a known range of values. Here\u2019s how you can use this element:<\/p>\n<p>&lt;p&gt; you can heat your oven to &lt;meter min= \u201c150\u201d max= \u201c230\u201d value= \u201c200\u201d&gt;200 degrees&lt;\/meter&gt;.&lt;\/p&gt;<\/p>\n<div id=\"om-b7tfondceubrbvku-holder\"><\/div>\n<p><script>\/\/ <![CDATA[\nvar b7tfondceubrbvku,b7tfondceubrbvku_poll=function(){var r=0;return function(n,l){clearInterval(r),r=setInterval(n,l)}}();!function(e,t,n){if(e.getElementById(n)){b7tfondceubrbvku_poll(function(){if(window['om_loaded']){if(!b7tfondceubrbvku){b7tfondceubrbvku=new OptinMonsterApp();return b7tfondceubrbvku.init({u:\"18402.328170\",staging:0,dev:0,beta:0});}}},25);return;}var d=false,o=e.createElement(t);o.id=n,o.src=\"\/\/a.optnmnstr.com\/app\/js\/api.min.js\",o.onload=o.onreadystatechange=function(){if(!d){if(!this.readyState||this.readyState===\"loaded\"||this.readyState===\"complete\"){try{d=om_loaded=true;b7tfondceubrbvku=new OptinMonsterApp();b7tfondceubrbvku.init({u:\"18402.328170\",staging:0,dev:0,beta:0});o.onload=o.onreadystatechange=null;}catch(t){}}}};(document.getElementsByTagName(\"head\")[0]||document.documentElement).appendChild(o)}(document,\"script\",\"omapi-script\");\/\/ ]]><\/script><!-- \/ OptinMonster --><\/p>\n<h6><span style=\"color: #003366;\">#2: Adjustments to the iframe<\/span><\/h6>\n<p>The HTML Inline Frame Element\u2014the &lt;iframe&gt; element\u2014represents a nested browsing content that can be used to embed another HTML page onto the current page. Here are the attributes that you can use with the iframe element to improve the level of security in HTML5:<\/p>\n<p>* <strong>Sandbox<\/strong>. When specified as an empty string, the sandbox attribute will allow extra restrictions on the content which will appear in the inline frame.<br \/>\n<em>Below example we have given the frame all the capabilities it requires, and the browser will helpfully deny its access to any of the privileges that we didn\u2019t explicitly grant it via the sandbox attribute\u2019s value.<\/em><br \/>\n* <strong>Srcdoc<\/strong>. The srcdoc attribute is used in conjunction with the sandbox and seamless attributes. However, when a browser supports the srcdoc attribute, it will automatically override the content that\u2019s specified in the src attribute.<br \/>\n* <strong>Src<\/strong>. It specifies the URL of the web page that you\u2019d to embed.<\/p>\n<p>Here\u2019s an example of HTML5 code demonstrating the use of the above-mentioned attributes:<\/p>\n<pre>&lt;iframe id= Another_Demonstration\u201d sandbox=\"allow-same-origin allow-scripts allow-popups allow-forms\"&gt; name= \u201cAnother_Demonstration\u201d title= \u201cAnother_Demonstration\u201d width= \u201c500\u201d height= \u201c450\u201d scrolling=\"no\" marginheight=\"0\" marginwidth=\"0\" src= https:\/\/www.capitalnumbers.com\/media\/file.php&gt; srcdoc=https:\/\/www.capitalnumbers.com\/media\/file2.php&gt; &lt;\/iframe&gt;<\/pre>\n<h6><span style=\"color: #003366;\">#3: Adjustments to multimedia elements<\/span><\/h6>\n<p>HTML5 has introduced two built-in media support elements namely: the &lt;audio&gt; and the &lt;video&gt; elements. These elements provides users with capabilities to easily embed both audio and video into HTML documents. Here\u2019s an example of how the video element can be specified in HTML5:<\/p>\n<pre>&lt;video src= \u201chttps:\/\/www.capitalnumbers.com\/promotionalvideo.ogg\u201d controls&gt;\n&lt;source src=\"video.mp4\" type=\"video\/mp4\"&gt;\n&lt;source src=\"video.ogg\" type=\"video\/ogg\"&gt;\nYour browser does not support the video tag.\n&lt;\/video&gt;<\/pre>\n<p>Here is an example for embedding audio into your HTML document<br \/>\nHere\u2019s an example of how the audio element can be specified in HTML5:<\/p>\n<pre>&lt;audio src= \u201chttpS:\/\/www.capitalnumbers.com\/promotionalaudio.ogg\u201d&gt; &lt;source src=\"audio.ogg\" type=\"audio\/ogg\"&gt; &lt;source src=\"audio.mp3\" type=\"audio\/mpeg\"&gt; Your browser does not support the audio element. &lt;\/audio&gt;<\/pre>\n<h6><span style=\"color: #003366;\">#4: Adjustments to 3D Graphics and their Effects<\/span><\/h6>\n<p>The &lt;canvas&gt; element can be used to draw graphics, create animations, etc. using JavaScript, now there are many JS frameworks available to make your life easire.. Here\u2019s the basic illustration of using the canvas element:<\/p>\n<pre>&lt;canvas id= \u201cDemonstration of Canvas Element\u201d width= \u201c300\u201d height= \u201c250\u201d&gt;\n&lt;\/canvas&gt;<\/pre>\n<p>For instance, if you want to provide text descriptions of the canvas content\u2014by providing a static image of the dynamic content\u2014here\u2019s is how you can do it in HTML5:<\/p>\n<pre>&lt;canvas id= \u201cDemonstrations2\u201d width= \u201c300\u201d height= \u201c250\u201d&gt;\nThe current price of the stock is: $300+200\n&lt;\/canvas&gt;<\/pre>\n<p>That\u2019s not everything, there\u2019s more to learn in HTML5. Get in contact with us for more detailed information.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The fact that HTML5 is powerful with a wider set of technologies that allows development of more diverse and powerful websites and applications isn\u2019t in doubt. Therefore, knowing how to use these features is the first step towards becoming an efficient web developer. This blog post walks you through a comprehensive list of new features &#8230;<\/p>\n","protected":false},"author":12,"featured_media":1566,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false},"categories":[743],"tags":[],"acf":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.capitalnumbers.com\/blog\/wp-json\/wp\/v2\/posts\/1551"}],"collection":[{"href":"https:\/\/www.capitalnumbers.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.capitalnumbers.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.capitalnumbers.com\/blog\/wp-json\/wp\/v2\/users\/12"}],"replies":[{"embeddable":true,"href":"https:\/\/www.capitalnumbers.com\/blog\/wp-json\/wp\/v2\/comments?post=1551"}],"version-history":[{"count":3,"href":"https:\/\/www.capitalnumbers.com\/blog\/wp-json\/wp\/v2\/posts\/1551\/revisions"}],"predecessor-version":[{"id":16316,"href":"https:\/\/www.capitalnumbers.com\/blog\/wp-json\/wp\/v2\/posts\/1551\/revisions\/16316"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.capitalnumbers.com\/blog\/wp-json\/wp\/v2\/media\/1566"}],"wp:attachment":[{"href":"https:\/\/www.capitalnumbers.com\/blog\/wp-json\/wp\/v2\/media?parent=1551"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.capitalnumbers.com\/blog\/wp-json\/wp\/v2\/categories?post=1551"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.capitalnumbers.com\/blog\/wp-json\/wp\/v2\/tags?post=1551"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}