Interview questions for HTML5 (Part-2)

1. List out the advantages of HTML 5?

Below is a list of some advantages of HTML5:
• Mutuality
• Cleaner mark-up / Improved Code
• Improved Semantics
• Elegant forms and web apps
• Offline Application cache
• Supports rich media elements
• Geolocation access from web
• Optimized for Mobile devices

2. List out the advances of HTML5?

Some of the most interesting new features in HTML5:
• The <canvas> element for 2D drawing
• The <video> and <audio> elements for media playback
• Support for local storage
• New content-specific elements, like <article>, <footer>, <header>, <nav>,<aside>,<section>

3. Do all HTML tags have an end tag?

No. There are some HTML tags that don’t need a closing tag. For example: <image> tag, <br> tag

4. If I do not put <! DOCTYPE html> will HTML5 work?

No, the browser will not be able to identify that it is an HTML document and HTML 5 tags do not function properly..

5. What is SVG?

1. SVG is the abbreviation for Scalable Vector Graphics and is recommended by W3C.
2. It is used to define vector-based graphics for the Web.
3. The graphics are defined in XML format.
4. An important quality of SVG graphics is that their quality is maintained even when they are zoomed or resized.
5. All the element and attributes of SVG files can be animated.

6. What are the advantages of SVG over other image format like JPEG or GIF?
Following are the main advantages of using SVG over other image formats:

– It is possible to scale the SVG images.
– They can be created and edited with any text editor.
– The print quality of these image is high at any resolution.
– It is possible to zoom the SVG images without any degradation in the quality.
– SVG images can be searched, indexed, scripted, and compressed.

7. What is the use of required attribute in HTML5?

It forces user to fill text on textarea or textfield before submitting form. It is used for form validation.
Name: <input type=”text” name=”name” required>

8. What are the new <input> types for form validation in HTML5?

The new input types for form validation are email, url, number, tel and date.
<input type=”email”

9. What do you understand by W3C?

W3C stands for World Wide Web Consortium.

10.  What is tweening?

• It is the method of generating intermediate frames between two images.
• It provides the impression that the first image has smoothly evolved into the second one.
• It is a vital technique utilized in all sorts of animations.
• In CSS3, Transforms (matrix, rotate, scale, translate etc.) module can be used to achieve tweening.

11. What is the difference between CSS2 and CSS3?

• The main distinguish ml between CSS2 and CSS3 is that CSS3 is divided into different sections which are also known as modules.
• Unlike CSS2, CSS3 modules are supported by almost all browsers.

12. What is the use of the required attribute in HTML5?

It forces a user to fill text on the text field or text area before submitting the form. It is used for form validation.
1. Name: <input type=”text” name=”name” required>

13. What are the new <input> types for form validation in HTML5?

The new input types for form validation are email, URL, number, tel, and date.

14. Can HTML5 get the geographical position of a user?

– Yes, HTML5 can get the location of a user with the use of Geolocation API.
– Use getCurrentPosition() method to get the user’s current position.

15. What are the audio tags provided by HTML5?

HTML5 provides following audio tags:

<audio> – Defines sound content
<source> – Defines multiple media resources for media elements, such as <video> and <audio>

16. What is formatting in HTML?

The HTML formatting is a process of format the text for a better look and feel. It uses different tags to make text bold, italicized, underlined.

17. How many types of heading does an HTML contain?

The HTML contains six types of headings which are defined with the <h1> to <h6> tags. Each type of heading tag displays different text size from another. So, <h1> is the largest heading tag and <h6> is the smallest one
What is the session Storage Object in HTML5? How to create

18. What is the session Storage Object in HTML5? How to create and access?

The session Storage object stores the data for one session. The data is deleted when the user closes the browser window. like below we can create and access a sessionStorage here we created “blog name” as session
<script type=”text/javascript”>
Document. Write (

19. What is the difference between Html5 application cache and regulate Html browser cache?

The new HTML5 specification allows browsers to prefetch some or all of website assets such as HTML files, images, CSS, JavaScript, and so on, while the client is connected. It is not necessary for the user to have accessed this content previously, for fetching this content. In other words, application cache can prefetch pages that have not been visited at all and are thereby unavailable in the regular browser cache. Prefetching files can speed up the site’s performance, though you are of course using bandwidth to download those files initially.

20. What is the use of details and summary tag?

The details tag is used to specify some additional details on the web page. It can be viewed or hidden on demand. The summary tag is used with details tag.

21. Is audio tag supported in HTML5?

Yes. It is used to add sound or music files on the web page. There are three supported file formats for HTML 5 audio tag.
1. mp3
2. WAV
3. Ogg
Let’s see the code to play mp3 file using HTML audio tag.

leave your comment

Your email address will not be published. Required fields are marked *