1. Home
  2. Computer Science MCQs
  3. HTML
  4. elements is only a _________ to the graphics.

Added 20 Jan 2024

<canvas> elements is only a _________ to the graphics.

  1. component
  2. container Correct answer
  3. attribute
  4. method

Correct answer

B. container

12 views

MCQSEXAM

Explanation

The <canvas> element is only a container for graphics. On its own it draws nothing; the actual lines, shapes, text and images are produced by JavaScript through the canvas drawing API, obtained with getContext("2d").

This is the key difference from SVG, where each shape is itself an element in the page.

For more solved questions like this one, see Computer Science MCQs on MCQsExam.com.

Doubts & discussion

Not sure why the answer is B? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More HTML MCQs

Practise all HTML MCQs

Similar MCQs