Articles → HTML 5 → Canvas Tag In Html5

Canvas Tag In Html5






Purpose







Syntax


<canvas id=" " width="" height=""></canvas>




  1. Id → Unique identifier for canvas.
  2. Width → Specifies the width of the canvas
  3. Height → Specifies the height of the canvas

Access Canvas Using Javascript




var canvas = document.getElementById("myCanvas");



Browser Support


Internet ExplorerFirefoxChromeSafariOperaEdge
9.02.04.03.19.0Yes



Video





Posted By  -  Karan Gupta
 
Posted On  -  Wednesday, January 4, 2017
 
Updated On  -  Thursday, January 3, 2019

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250