π What is HTML Canvas?
β The HTML <canvas> element is used to draw graphics on a web page via JavaScript.
β The <canvas> element is only a container for graphics.
β Canvas has several methods for drawing paths, boxes, circles, text, and adding images.
β It uses the bitmap image format.
β These are well suited for gaming applications.
β Canvas images are not that flexible.
β It refers to paint the program.
π Syntax Of HTML Canvas
β Always specify an id attribute (to be referred to in a script), and a width and height attribute to define the size of the canvas.
β To add a border, use the style attribute.
Let's see some examples....
1οΈβ£ Draw Linear Gradient
2οΈβ£ Draw Circular Gradient
Thanks for reading this thread β€οΈ
If you like it , make sure you:
π· Like the tweet
π· Retweet the first tweet β‘
For more content , follow:
@MrunayU