Logo F2FInterview

HTML5 Interview Questions

Q   |   QA

HTML5 specification allows browsers to prefetch some or all of a 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.

We can display audio using the tag as shown below:

<audio controls=“controls”>
<source src=“test.mp3″ type=“audio/mp3″ />
</audio>

HTML5 offers two new objects for storing data on the client:

LocalStorage – stores data with no time limit

<script type=“text/javascript”>
localStorage.lastname=“ZAG”;
document.write(localStorage.lastname);
</script>

SessionStorage – stores data for one session.The data is deleted when the user closes the browser window.

<script type=“text/javascript”>
sessionStorage.lastname=“ZAG”;
document.write(sessionStorage.lastname);
</script>

We can display video using the tag as shown below:

<video width=“320″ height=“240″ controls=“controls”>
<source src=“test.mp4″ type=“video/mp4″ />
</video>

The canvas element: Canvas consists of a drawable region defined in HTML code with height and width attributes. JavaScript code may access the area through a full set of drawing functions similar to other common 2D APIs, thus allowing for dynamically generated graphics. Some anticipated uses of the canvas include building graphs, animations, games, and image composition.

  • Timed media playback
  • Offline storage database
  • Document editing
  • Drag-and-drop
  • Cross-document messaging
  • Browser history management
  • MIME type and protocol handler registration

In order to link this F2FInterview's page as Reference on your website or Blog, click on below text area and pres (CTRL-C) to copy the code in clipboard or right click then copy the following lines after that paste into your website or Blog.

Get Reference Link To This Page: (copy below code by (CTRL-C) and paste into your website or Blog)
HTML Rendering of above code: