1. What's new HTML 5 DocType and Charset?
Since HTML 5 is now not a subset of SGML, its DocType is simplified as follows:
<!doctype html>
And HTML 5 uses UTF-8 encoding as follows:
<meta charset="UTF-8">
2. How can we embed Audio in HTML 5?
HTML 5 comes with a standard way of embedding audio files. Supported audio formats are MP3, Wav and Ogg.
<audio controls>
<source src="jamshed.mp3" type="audio/mpeg">
Your browser doesn't support audio embedding feature.
</audio>
3. How can we embed Video in HTML 5?
The same as for audio, HTML 5 defines a standard way to embed video files. Supported video formats are MP4, WebM and Ogg.
<video width="450" height="340" controls>
<source src="jamshed.mp4" type="video/mp4">
Your browser does'nt support video embedding feature.
</video>
4. What are the new media elements in HTML 5 other than audio and video?
HTML 5 has strong support for media. Other than audio and video tags, it comes with the following tags:
- <embed> acts as a container for external applications.
- <track> defines text track for media.
- <source> is helpful for multiple media sources for audio and video.
5. What is the usage of a canvas element in HTML 5?
<canvas> is an element in HTML5 that we can use to draw graphics using scripting (that is most probably JavaScript).
This element behaves like a container for graphics and the rest will be done by scripting. We can draw images, graphs and a bit of animations etcetera using a <canvas> element.
<canvas id="canvas1" width="300" height="100">
</canvas>
6. What are the various types of storage in HTML 5?
HTML 5 has the capability to store data locally. Previously it was done using cookies.
The exciting thing about this storage is that it's fast as well as secure. There are two different objects that can be used to store data.
- localStorage object stores data for a longer period of time even if the browser is closed.
- sessionStorage object stores data for a specific session.
7. What are the new Form Elements introduced in HTML 5?
There are a number of new form elements that have been introduced in HTML 5 as follows:
- datalist
- datetime
- output
- keygen
- date
- month
- week
- time
- number
- range
- URL
8. What are the deprecated Elements in HTML5 from HTML4?
Elements that are deprecated from HTML 4 to HTML 5 are:
- frame
- frameset
- noframe
- applet
- big
- center
- basefront
9. What are the new APIs provided by the HTML 5 standard?
The HTML 5 standard comes with a number of new APIs. A few of them are as follows:
- Media API
- Text Track API
- Application Cache API
- User Interaction
- Data Transfer API
- Command API
- Constraint Validation API
- History API
- And many more....
10. What is the difference between HTML 5 Application Cache and regular HTML Browser Cache?
One of the key features of HTML 5 is an "Application Cache" that enables us to make an offline version of a web application. It allows fetching of a few or all of website contents such as HTML files, CSS, images, JavaScript etcetera locally. This feature speeds up the site performance. This is done using a manifest file defined as follows:
<!doctype html>
<html manifest="example.appcache">
.....
</html>
As compared with traditional browser caching, it's not compulsory for the user to visit website contents to be cached.
Want to crack an interview then here is a detailed article on HTML5 interview questions and answers. Also, reading JavaScript interview questions and CSS interview questions with HTML5 for cracking interview.

Chittaranjan SwainPosted Dec 11, 2019, 11:15 PM
Nice article.
Sourav Kumar DasPosted Dec 11, 2019, 11:08 PM
Nice useful article. Thanks for sharing.
Rahul singhPosted Dec 10, 2019, 11:55 AM
Nice Article...
Rushi MehtaPosted Dec 10, 2019, 1:31 AM
Nice, It's really help
kalu singh raoPosted Jul 4, 2016, 2:18 AM
Nice...
Debasis SahaPosted May 17, 2016, 9:49 AM
Nice one..
Bhuvanesh MohankumarPosted May 17, 2016, 5:45 AM
Useful one, shared with friends
Rupali ShindePosted May 17, 2016, 12:42 AM
Thanks for sharing
Pankaj Kumar ChoudharyPosted May 16, 2016, 11:15 PM
Nice Article.........
Pradeep SahooPosted May 16, 2016, 11:13 PM
Good collections of questions .... Thanks for sharing ...
Gowtham RajamanickamPosted Apr 7, 2016, 3:05 AM
good one..
Mohsin AzamPosted Jan 28, 2016, 8:37 AM
nice
Rahul Kumar SaxenaPosted Feb 23, 2015, 12:37 AM
Appreciate for sharing experience ... :)
Khargesh RajputPosted Feb 22, 2015, 11:02 PM
thanks for sharing
Sanjay SinghPosted Apr 26, 2014, 7:59 AM
thanks for the sharing it...
Manish SharmaPosted May 10, 2013, 6:07 AM
Thanks Imran for sharing such a very useful questions on HTML5...
Imran GhaniPosted May 4, 2013, 2:24 PM
Its a broader questions. A number of technologies are involved in developing a web application these days. But very simple two line answer can be as follows: 1. For Client Side -> HTML, JavaScript 2. For Server-side -> PHP or ASP.NET or Java (JSP, Servlets, etc.)
Tapobrata PaulPosted May 4, 2013, 12:01 AM
For a web-developer what are the languages are necessary for industry.
Imran GhaniPosted May 3, 2013, 3:09 PM
Thanks mahesh, your guidance is helpful for us and community.
Mahesh ChandPosted May 3, 2013, 2:19 PM
@Imgran and @Suthish, thanks. I already know the answers. I was asking if you could add these questions to the Article so young guys can benefit from it. These are the questions I will ask if I am taking an Interview with other questions you mentioned in the article. Cheers!
Imran GhanieditedPosted May 3, 2013, 11:54 AMEdited May 3, 2013, 11:55 AM
1. Why should we use HTML5? Basically HTML5 is the newer version and its becoming a standard now. Modern browsers support HTML5 and allow us to use new and exciting features. Another important thing is that its no longer part of SGML. Its now a language of its own. 2. What are the pros and cons of using HTML5 over ASP.NET or PHP? HTML5 comes with a lot of new features. But its not going to replace ASP.NET or PHP. Both ASP.NET and PHP are server-side technologies that renders HTML.So, there is no comparison between HTML5 and ASP.NET/PHP. 3. What are the limitations of HTML5? Truly there are few limitations of HTML5 but the major one is that HTML5 support latest browsers only, very limited support for older browsers.
Suthish NairPosted May 3, 2013, 11:42 AM
Mahesh, why you said ".. over ASP.NET"? This means using HTML5 with ASP.NET is not good also?
Mahesh ChandPosted May 2, 2013, 11:15 AM
Great Imran. Good work. Here are a few questions from me, if you can update the article. I think these are critical questions. 1. Why should you use HTML 5? 2. What is pros or cons of using HTML 5 over ASP.NET or PHP? 3. What are limitations of HTML 5?