1. Home
  2. Computer Science MCQs
  3. HTML
  4. Canvas is able to draw the 2D graphics using—————-

Added 20 Jan 2024

Canvas is able to draw the 2D graphics using—————-

  1. XML
  2. HTML
  3. Java script Correct answer
  4. XHTML

Correct answer

C. Java script

13 views

MCQSEXAM

Explanation

Canvas draws 2D graphics using JavaScript. The <canvas> tag only reserves an area on the page; a script obtains a drawing context with getContext("2d") and then calls methods such as fillRect(), arc() and drawImage().

HTML, XML and XHTML are markup languages and cannot issue drawing commands.

Want more practice? Try the full set of Computer Science MCQs on MCQsExam.com.

Doubts & discussion

Not sure why the answer is C? 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