It’s a collection of selected top 10 HTML5 Interview Questions and Answers. These are the most frequently asked interview questions for web developers. You will definitely feel that your understanding enhances after going through these important Interview Questions. You can take a free online test for HTML5 at the end of this tutorial to validate your skill and further strengthen your level of understanding about latest HTML standard.
1.What’s new HTML 5 DocType and Charset?
As HTML 5 is now not subset of SGML so its DocType is simplified as follows:
And HTML 5 uses UTF-8 encoding as follows:
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.
<source src=”jamshed.mp3″ type=”audio/mpeg”>
Your browser does’nt support audio embedding feature.
3.How can we embed Video in HTML 5?
Same like audio, HTML 5 defined standard way of embedding video files.Supported video formats are MP4, WebM and Ogg.
<source src=”jamshed.mp4″ type=”video/mp4″>
Your browser does’nt support video embedding feature.
4.What are the new media element 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 application.
- <track> defines text track for media.
- <source> is helpful for multiple media sources for audio and video.
5.What is the usage of canvas Element in HTML 5?
This element behaves like a container for graphics and rest of things will be done by scripting. We can draw images, graphs and a bit of animations etc using <canvas> element.
<canvas id=”canvas1″ width=”300″ height=”100″>
6.What are the different types of storage in HTML 5?
HTML 5 has the capability to store data locally. Previously it was done with the help of cookies.
Exciting thing about this storage is that its fast as well as secure.
There are two different objects which 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 has been introduced in HTML 5 as follows:
8.What are the deprecated Elements in HTML5 from HTML4?
Elements that are deprecated from HTML 4 to HTML 5 are:
9.What are the new APIs provided by HTML 5 standard?
HTML 5 standard comes with a number of new APIs. Few of it 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?
As compared with traditional browser caching, Its not compulsory for the user to visit website
contents to be cached.
Need more HTML5 Interview Questions? please follow a MUST HAVE Interview Questions series for HTML5 here.
Top 10 Interview Questions and Answers Series:
- Top 10 WCF Interview Questions
- Comprehensive Series of WCF Interview Questions
- Top 10 HTML5 Interview Questions
- Top 10 ASP.NET Interview Questions
- Comprehensive Series of ASP.NET Interview Questions
- Top 10 ASP.NET MVC Interview Questions
- Top 10 ASP.NET Web API Interview Questions
- Top 10 ASP.NET AJAX Interview Questions