--- title: Canvas slug: HTML/Canvas tags: - HTML - 'HTML:Canvas' - 'HTML:Element' - NeedsTranslation - References - TopicStub translation_of: Web/API/Canvas_API ---
Added in HTML5, the HTML {{HTMLElement("canvas")}} element is an element which can be used to draw graphics via scripting (usually JavaScript). For example, it can be used to draw graphs, make photo compositions, create animations or even do real-time video processing.
Mozilla applications gained support for <canvas>
starting with Gecko 1.8 (i.e. Firefox 1.5). The element was originally introduced by Apple for the OS X Dashboard and Safari. Internet Explorer supports <canvas>
from version 9 onwards; for earlier versions of IE, a page can effectively add support for <canvas>
by including a script from Google's Explorer Canvas project. Google Chrome and Opera 9 also support <canvas>
.
The <canvas>
element is also used by WebGL to do hardware-accelerated 3D graphics on web pages.
<canvas>
element is part of the WhatWG Web applications 1.0 specification, also known as HTML5.<canvas>
and its advanced features.<canvas>
.<canvas>
demos.