Click here to Skip to main content
11,570,352 members (59,563 online)
Click here to Skip to main content

Tagged as

Top 10 HTML 5 Interview Questions

, 2 May 2013 CPOL 85.4K 27
Rate this:
Please Sign up or sign in to vote.
A list of the top 10 HTML 5 interview questions

1. What's new HTML 5 DocType and Charset?

As 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.

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.

<video width="450" height="340" controls>
<source src="jamshed.mp4" type="video/mp4">
Your browser does'nt support video embedding feature.

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 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?

<canvas> is an element in HTML5 which we can use to draw graphics with the help of scripting (which is most probably JavaScript).
This element behaves like a container for graphics and rest of the 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. 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:

  • 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
  • email
  • 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 HTML 5 standard?

HTML 5 standard comes with a number of new APIs. 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 "Application Cache" that enables us to make an offline version of a web application. It allows to fetch few or all of website contents such as HTML files, CSS, images, JavaScript, etc. locally. This feature speeds up the site performance. This is achieved with the help of a manifest file defined as follows:

<!doctype html>
<html manifest="example.appcache">

As compared with traditional browser caching, it's not compulsory for the user to visit website contents to be cached.

Related Web Development Tutorials


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Imran Abdul Ghani
Software Developer (Senior) Emaratech
United Arab Emirates United Arab Emirates
Imran Abdul Ghani has more than 10 years of experience in designing/developing enterprise level applications. He is Microsoft Certified Solution Developer for .NET(MCSD.NET) since 2005. You can reach his blogging at WCF Tutorials, Web Development, SharePoint for Dummies.

You may also be interested in...

Comments and Discussions

QuestionVery bad Pin
Sergey Alexandrovich Kryukov25-Mar-15 4:09
mvpSergey Alexandrovich Kryukov25-Mar-15 4:09 
GeneralMy vote of 5 Pin
Rajeev Jayaram26-Jul-13 9:57
memberRajeev Jayaram26-Jul-13 9:57 
SuggestionHtml5 Interview Questions answers Pin
Rakesh Sinha18-Jun-13 3:09
memberRakesh Sinha18-Jun-13 3:09 
GeneralMy vote of 5 Pin
Mihai MOGA13-Jun-13 20:56
memberMihai MOGA13-Jun-13 20:56 
GeneralMy vote of 5 Pin
ibrahim_ragab10-Jun-13 4:09
memberibrahim_ragab10-Jun-13 4:09 
GeneralRe: My vote of 5 Pin
Raj Shelar17-Jun-13 21:58
groupRaj Shelar17-Jun-13 21:58 
GeneralMy vote of 4 Pin
Omneya Hassanain6-Jun-13 11:02
professionalOmneya Hassanain6-Jun-13 11:02 
GeneralMy vote of 4 Pin
Prasad Khandekar2-May-13 5:09
professionalPrasad Khandekar2-May-13 5:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.150624.2 | Last Updated 2 May 2013
Article Copyright 2013 by Imran Abdul Ghani
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid