Canvas tag
In this chapter you will learn:
Use canvas tag
The canvas element is a drawing surface that we drive using JavaScript. All of functionality from Canvas is exposed through a JavaScript object.
The following code uses the canvas element with basic fallback content.
<!DOCTYPE HTML><!-- ja v a 2s . c o m-->
<html>
<head>
<style>
canvas {
border: medium double black;
margin: 4px
}
</style>
</head>
<body>
<canvas width="500" height="200">
Your browser doesn't support the <code>canvas</code> element
</canvas>
</body>
</html>
The width and height attributes specify the size of the canvas.
Next chapter...
What you will learn in the next chapter:
Home » Javascript Tutorial » Canvas