HTML5 is the latest version of the most widely used scripting language for web development and design. It was created in 90s and continues to evolve to the day. HTML5 is basically a crossed-version of HTML or XHTML, hence establishing a single mark-up language to serve the purpose.
With the evolution of the language, several additional and more powerful features have been added to it. For example, elements like <section>
, <article>
, <header>
, and <nav> have been included to increase the scope of the language. Additional features include
functions for embedding audio, video, graphics, client-side data storage, and interactive documents. Consider two short examples demonstrating the use of two such features:
1 2 |
<video src="movie.avi" controls="controls"> </video> |
This simple code is used to display a video in HTML5. The control attribute is for adding play, pause, and volume controls. This feature was absent in the previous versions of HTML. Similarly, consider another example for embedding audio content into the browser:
1 2 |
<audio src="song.mp3" controls="controls"> </audio> |
Its syntax is just like the video code. Different audio files can also be linked within the element. For example:
1 2 3 4 5 |
<audio controls="controls"> <source src="play1.ogg" type="audio/ogg" /> <source src="play1.mp3" type="audio/mpeg" /> Audio element support is not available. </audio> |
If the audio support is absent in the browser, which happens with the old browsers, the message “Audio element support is not available” is simply displayed, otherwise the first format which is recognized would be played.
A clear and evident advantage of HTML5 is that it improves mutual functioning of different elements and reduces development costs by making precise rules on how to handle all the HTML elements, and how to remove the bugs. It removes most ‘div’ tags and replaces them with new structural elements. Besides, the new HTML5 geo-location APIs make location, whether generated via GPS or other methods, directly available to any HTML5-compatible browser-based application. A good example is the Google Latitude for the iPhone. The clear and solid advantages that HTML5 generates as compared to the previous versions make it an obvious choice for web programmers.