The HTML5 canvas Tag

The HTML5 <canvas> tag is important in enabling on the spot drawing of graphics. It is important though to use scripting, like JavaScript, to be able to utilize the function. The HTML5 <canvas> tag is necessary primarily for containing the graphics. However, the actual drawing of the graphics should be done with the use of script.

The <canvas> tag is newly introduced for HTML5 so this is not found in HTML4.01.

Using the HTML5 <canvas> tag is not really a problem since this is supported by all major web browsers these days such as Google Chrome, Internet Explorer, Safari, Opera and Firefox. In cases wherein the HTML5 <canvas> tag is not supported by the web browser, all texts inside the <canvas> element are shown.

The <canvas> tag is capable of working along with both the Event Attributes and Global Attribute in HTML5. Attributes for the HTML5 <canvas> tag are the following:






Specifies the height of the canvas



Specifies the width of the canvas

It has to be noted that these attributes are new since the HTML5 <canvas> tag is not utilized for HTML4.01.

Featured pages


Learn about HTML5 architecture, design principles and patterns on HTML5 Overview Tutorial. Become …


Learn about HTML5 tags and discover a new list of HTML5 tags. Find out about HTML5 tags support by…


 Learn HTML5 development techniques, tips and tricks on our website. Find out what is required…

Date Time Picker

HTML5 forms use date and time controls regularly. HTML5 date and time controls are used by booking …