Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Selected Reading
Why to use canvas tag in HTML5?
Specifies height of the canvas.The HTML
Let’s see a simple
Here are the attributes −
Attribute |
Value |
Description |
| height |
pixels |
Specifies height of the canvas. |
| width |
pixels |
Specifies width of the canvas. |

Example
You can try to run the following code to learn how to use canvas to create a rectangle. The canvas element has a DOM method called getContext, which obtains rendering context and its drawing functions. This function takes one parameter, the type of context 2d.
HTML Canvas Tag
Advertisements
