Can you explain What the use of Canvas Element in HTML5?
Submitted by: AdministratorThe 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
<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
Top HTML5 Questions
☺ | Tell me What is the <!DOCTYPE>? Is it necessary to use in HTML5 |
☺ | Explain How many New Markup Elements you know in HTML5 |
☺ | What is the status of the development of the HTML 5 standard? |
☺ | Explain the difference between HTML and HTML5 |
☺ | Explain What are the New Media Elements in HTML5? is canvas element used in HTML5 |
Top Top World Wide Web Categories
☺ | Cascading Style Sheet CSS Interview Questions. |
☺ | HTML5 Interview Questions. |
☺ | Basic Internet Interview Questions. |
☺ | Domain Name System (DNS) Interview Questions. |
☺ | JavaScript Interview Questions. |