Canvas and SVG Tags Interview Questions – HTML Canvas and SVG Tags Online Quiz

Question 1:  What does the <canvas> tag do in HTML5?

Question 2:  Which JavaScript method is used to get the context of a canvas element?

Question 3:  What is the default width of the <canvas> element in HTML5?

Question 4:  What is the purpose of the stroke() method in the canvas context?

Question 5:  Which attribute of the <svg> tag specifies the width of an SVG image?

Question 6:  What does the <svg> tag define in HTML?

Question 7:  Which of the following is used to draw a circle in SVG?

Question 8:  How can you create a red rectangle in an SVG element?

Question 9:  Which method is used to draw a line on a canvas?

Question 10:  Which of the following is a valid attribute for the <canvas> tag?

Leave a Reply