Latest

6/recent/ticker-posts

Top 10 HTML 5 CANVAS SVG Interview Question and Answer analysis

HTML 5 CANVAS SVG Important Interview Question and Answer


Top 10 HTML 5 CANVAS SVG Interview Question and Answer analysis


 

1)  What is HTML5?

AnsHTML5 is the fifth and latest version of HyperText Markup Language. HTML5 describes the structure of the document and it is mainly used for creating interfaces rather than analytical works or logical. latest version of HTML5 is HTML5.2 released on December 2017. HTML5 provides a faster and more robust approach to web development.

2) Difference between HTML and HTML5?

Ans.

                       HTML


                         HTML 5


1.HTML does not support all major web browsers.



HTML5 supports all the major web browsers and new browsers.


2. Audio and video are not part of the HTML previous version.



Audio and Video is part of the HTML5 version.


3.HTML does not allow JavaScript to run in the browser.



HTML5 allow JavaScript to run in background.


4.HTML is not mobile-friendly.


 

HTML5 is mobile friendly.

3) Write Features of HTML5?

Ans. Features of HTML5 are-
1.HTML5 supports local storage in order to achieve without resorting to any third-party plugins.
2.HTML5 offers elements like details, dialogue, mark, header, footer, article, section, nav, etc.
3.HTML5 Provides media support. The canvas element used for drawing a 2D diagram.
4. In HTML5 we can establish full-duplex communication channels with a server using Web Sockets.
5.HTML5 has many features including video, audio, charts, high-quality drawings, animations as well as the integration of SVG content.
6.HTML5 support Geo-location services.

4) Explain Canvas in HTML5?

Ans. HTML Canvas is the new features of HTML5. Canvas is a pixel-based graphics. It is used to draw graphics on the webpage via JavaScript.canvas is also used for rendering graphics. The Canvas element is only a container for graphics. Canvas has several methods for drawing paths, boxes, circles, characters, and adding images. The canvas was originally introduced by Apple. By default, the canvas element has 300px of width and 150px of height without any border and content.

5) What is SVG?

Ans. SVG stands for Scalable Vector Graphics. it is an XML-based image format. SVG is used to draw two-dimensional vector-based graphics in web pages. SVG is mostly used for vector type diagrams like pie charts, 2-Dimensional graphs in an X, Y coordinate system. SVG is best suited for applications with large rendering areas like google maps.

6) Define LocalStorage And SessionStorage Objects?

Ans.LocalStorage: The localStorage object stores the data without an expiry date.

 SessionStorage: Sessionstorage object stores the data for only one session.

7) What is Geolocation in HTML5?

Ans. Geo-location in HTML5 is utilized to share the location or area with some site and aware of the specific location. Geolocation discovers the geographic coordinates (latitude and longitude numbers) of the current location of your site's visitor. It is mainly used for nearby caf├ęs, local businesses, local famous places, local restaurants, or showing the location on the map. It utilizes JavaScript to give latitude and longitude to the backend server.

8) What is an API in HTML5? Write the list of APIs available in HTML5.

AnsAPI stands for Application Programming Interfaces and is an approach to create applications. They use pre-built components. Utilizing the accessible APIs, designers can incorporate the highlights into their sites.

Name of List API's available in HTML5:

1.User Interaction
2.Data Transfer API,
3.History API
4.Application Cache API
5.Text Track API
6.Media API
7.Command API

9) Define MathML and Meta tags in HTML5?

Ans. MathML: MathML represents Mathematical Markup Language and is utilized to show numerical and logical substance on the page.
Meta Tags: The <meta> element is used to specify page description keywords, author, and other metadata. metadata is used by browsers(how to display content)by search engines and other web services.

10) Write the Difference between SVG and Canvas?

Ans. 

                            SVG


                         Canvas


1. SVG is an XML the based vector image format for interactivity.



Canvas is an element in HTML to draw graphics on web pages.


2. SVG provides better scalability. So it can be printed with high quality at any resolution.


 Canvas provides poor scalability as it is not suitable for printing higher resolution.

 


3. SVG provides better performance with a larger surface or a smaller number of objects.


 

Canvas provides better performance with a smaller surface or a large number of objects.


4. SVG images cannot be saved in other formats


In Canvas, we can save the resulting images in .png and .jpg format.


 

The main aim of this blog to give the Top 10 HTML 5 CANVAS SVG Interview Question and Answer analysisIf you like the article share the feedback, and also, write comments if you find anything incorrect.

Post a Comment

1 Comments