Advantages of HTML5:
HTML5 is the latest version of HTML which has made the development process simple and easy. With cutting-edge features, it is the buzzword at the moment in the tech world. Lauded by experts, HTML5 has a host of features for added benefits including content security, improved semantics, interoperability and accessibility, drag and drop support, Browser history management, document editing and timed media playback. Apart from all these, there are some really interesting features and benefits you would like to know.
So, lets have a look at those added advantages of HTML5 after which you won’t be able to resist using it.
[list style=”1″ underline=”1″]
- DOCTYPE declaration
You need not copy and paste those long lines of code for doctype declaration like you used to do in older versions of HTML and XHTML > HTML5 comes up with a short and sweet doctype declaration which you can type easily. Moreover, the added advantage is that it works in every browser.
Believe it or not, this is it! This is the only code needed in HTML 5 to declare DOCTYPE.
- Cleaner code
For all of you sitting there who always wished to minimize the code, HTML 5 shortens the code using its newly added tags. in HTML 5. There is no need of ‘div’ and ‘class’ here.
For example: The simple header code with navigation:
<div id=”header”> <div id=”nav”> <ul> <li><a href'”#”>Link</a></li> <li><a href'”#”>Link</a></li> </ul> </div> </div>
Although this code is very clean, simple and easy to understand, HTML5 comes up with simpler than this. Though
are easy, you can replace it by
<header> and <nav>
<header> <nav> <ul> <li><a href'”#”>Link</a></li> <li><a href'”#”>Link</a></li> </ul> </nav> </header>
Other tags like
<articles> , <sections> and <footer>
have been added in HTML5 which helps to structure code in a proper way.
- Audio and Video support
Forget the huge confusing code you had to write just for playing audio and video. You don’t have to remember using difficult tags like
and a lot of parameters within it. Forget the Flash player and other media players
You can easily add audio and video, just the way you add images:
To adjust the size, just mention the parameters like width and height, the same as images:
<video src=”url” width=”540px” height=”280px” autoplay/>
For the old browsers, who do not support our new HTML5 needs a couple of lines of extra code, but it’s really simple and easy to understand:
<video poster=”myvideo.jpg” controls> <source src=”myvideo.m4v” type=”video/mp4” /> <source src=”myvideo.ogg” type=”video/ogg” /> <embed src=”/to/my/video/player”> </embed> </video>
HTML 5 supports Geolocation which allows you to locate yourself and share it to the rest of the world. Finding a location is possible either through IP address or GPS hardware which determines latitude and longitude or through your wireless network connection. The new HTML5 geolocation API finds the location through GPS or any other methods and makes it available to any HTML5 compatible browser based application.
- Mobile friendly
As it is clear from the current scenario that the use of mobile phones is constant increasing and will keep on increasing, HTML5 has been made mobile friendly. Mobile browsers have adopted HTML5 so it will be easy to make mobile projects.
- Local data storage
HTML 5 has ‘local data storage’ as one of its best features. It works better than cookies and has better security. Data can be stored from client side and it can be used even while you are offline because of the amazing web application cache property. You don’t have to worry about the user deleting cookies because of the client side database. You can use sessionStorage and localStorage properties.
- Vector Graphics
is the only container, actually a rectangular area in HTML to draw graphics. It is supported by all the modern browsers like Chrome, Firefox, Safari and Internet Explorer 9. You can draw rectangle, circle etc and color it with single color as well as multi color. Moreover, you can write anything with different font colors on the canvas. The new
tag which is used to draw graphics on the fly is also used in the game development.
Disadvantages of HTML5:
Although there are really less reasons not to adapt to HTML5, lets have a look at it.
[list style=”1″ underline=”1″]
- Media licensing issue
The basic problem with HTML5 is its media licensing issues. Rich media have to get compressed to be compatible with most of the browsers. For example: you have to use ‘ogg’ for Mozilla (Firefox) and mp3 audio for webkit browsers(Chrome and Safari). This issue is expected to be resolved soon.
- Browser supporting issue
Another problem with HTML5 is lack of browser support. All the modern browsers but Internet Explorer support HTML5. However, the new version of Internet Explorer IE9 supports HTML5. But this is not the major disadvantage as for the older IE versions that do not support HTML5, there is a small code to add in Java Script after which it will start supporting HTML5.
<!--[if lt IE 9]> <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script <![endif]-->
This shows that HTML5 is constantly striving to improve and will soon become a no-cons language. HTML5 will soon become a standard language and will streamline your business. So, it is advisable to switch onto HTML5 from now rather than waiting for forced use when it becomes standard.