The following are the frequently asked HTML5 Interview questions :
1. What is new HTML5 DocType and charset ?
Ans: HTML5 is not a subset of SGML, it's DocType is simplified as follows:
HTML5 uses UTF-8 encoding as shown below :
2. How to append audio file in HTML5 ?
Ans: HTML 5 comes with a standard way of embedding audio files. Supported audio formats are MP3, Wav and Ogg.
<source src="20Fingers2Brains.mp3" type="audio/mpeg">
Your browser doesn't support audio embedding feature.
3. How to append video in HTML5 ?
Ans: HTML 5 defined standard way of embedding video files. Supported video formats are MP4, WebM and Ogg.
<video width="450" height="340" controls>
<source src="20Fingers2Brains.mp4" type="video/mp4">
Your browser does'nt support video embedding feature.
4. What are the new media elements introduced in HTML5 other than audio and video ?
Ans: 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.
6. What are the different types of storage in HTML5 ?
Ans: HTML 5 has the capability to store data locally. Previously, it was done with the help of cookies. The exciting thing about this storage is that it's fast as well as secure.
There are two different objects which can be used to store data:
7. What are the new Form elements introduced in HTML5 ?
Ans: There are a number of new
formelements that have been introduced in HTML 5 as follows:
8. What are the deprecated Elements in HTML5 from HTML4?
Ans: Elements that are deprecated from HTML 4 to HTML 5 are:
9. What are the new APIs provided by HTML 5 standard?
Ans: HTML 5 standard comes with a number of new APIs. Few of them are as follows:
<h2>How r u?</h2>
18. What are the HTML5 tags and how to use them ?
Ans: Refer following link for HTML5 tags :