O'Reilly logo

Sams Teach Yourself HTML5 Mobile Application Development in 24 Hours by Jennifer Kyrnin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hour 10. Drawing with the HTML5 Canvas Element

What You’ll Learn in This Hour:

• How to use the <canvas> element to draw on web pages

• How to create lines, rectangles, and circles on canvases

• How to use images as portions of the canvas or as patterns

• What mobile devices support <canvas>

• How canvas differs from Flash and SVG

The HTML5 <canvas> element lets you use JavaScript to draw shapes, add images, and create animations right in your web page. It is not done with a different language (such as SVG) nor does it use a plug-in (like Flash).

In this hour you will learn what the <canvas> element is and how you can use it to create shapes and add images and text right inside the web browser. This hour serves as a jumping-off point for how ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required