Interviewer And Interviewee Guide

HTML5 Interview Question:

Can you explain What the use of Canvas Element in HTML5?

Submitted by: Administrator
The canvas element is used to draw graphics images on a web page by using javascript like below

<canvas id=“pcdsCanvas” width=“500″ height=“400″>
</canvas>
<script type=“text/javascript”>
var pcdsCanvas=document.getElementById(“phpzagCanvas”);
var pcdsText=pcdsCanvas.getContext(“2d”);
pcdsText.fillStyle=“#82345c”;
pcdsText.fillRect(0,0,150,75);
</script>
Submitted by: Administrator

Read Online HTML5 Job Interview Questions And Answers
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.