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

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

Imran Abdul Ghani has more than 10 years experience for designing/developing enterprise application using Microsoft technologies. He is Microsoft Certified Solution Developer (MCSD.NET) since 2005. You can find his blogg... Read more