HTML5 Interview Questions and Answers for Freshers - 2

11. Differentiate between HTML5 and Flash.

With Flash, browser support is limited. It requires a plug-in to be installed separately on a web browser to display and run content. It is CPU intensive and not as lightweight as HTML5. Flash is not friendly with SEO.

HTML5 is open source, freely available and supported by all browsers natively. It is lightweight, fast and takes less CPU time to render web pages. HTML5 is friendly with SEO.

12. What is HTML5 Web Storage? What are two types of web storage?

Web Storage lets web applications store data locally within the user's browser, similar to cookies. But Web storage is more secured and it can store large amount of data locally without affecting website performance.  

HTML5 Web Storage provides two objects for storing data on the client

i.) Local Storage - It stores data with no expiration date. The data in localStorage is persistent as long as the user chooses to clear the storage

ii.) Session Storage - It stores the data for one session. The data is deleted when the user closes the browser window.