The canvas element is part of HTML 5 and it allows the rendering of 2D shapes and bitmap(also called “raster”) images.
A canvas actually has two sizes:
- the size of the element.
- the size of the element’s drawing surface.
The element’s width and height attributes set both the size of the element and the size of the element’s drawing surface. CSS attributes affect only the element’s size and not the drawing surface.
- How to save an HTML 5 Canvas as an image on the server ?
- Resize image proportionally with CSS
- How to Resize JPEG Image in PHP ?
- How to auto-resize an image to fit a div container using CSS?
- How to create a canvas image using Fabric.js ?
- HTML | DOM Style resize Property
- Convert an image into grayscale image using HTML/CSS
- HTML | canvas Tag
- HTML | DOM Canvas Object
- HTML | Canvas Basics
- Difference between SVG and HTML 5 Canvas
- HTML | canvas arc() Method
- How to get Pixel from HTML Canvas ?
- HTML | canvas transform() Method
- HTML | canvas shadowColor Property
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.