Cover by Eric Freeman, Elisabeth Robson

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

Chapter 7. Bringing Out Your Inner Artist: The Canvas

image with no caption

HTML’s been liberated from being just a “markup” language. With HTML5’s new canvas element, you’ve got the power to create, manipulate and destroy pixels, right in your own hands. In this chapter we’ll use the canvas element to bring out your inner artist—no more talk about HTML being all semantics and no presentation; with canvas we’re going to paint and draw with color. Now it’s all about presentation. We’ll tackle how to place a canvas in your pages, how to draw text and graphics (using JavaScript, of course), and even how to handle browsers that don’t support the canvas element. And canvas isn’t just a one-hit wonder; you’re going to be seeing a lot more of canvas in other chapters in this book.

Note

Okay, “destroy” might be a little overly dramatic.

Note

In fact we hear <canvas> and <video> have been sharing more than just web pages... we’ll get into the juicy details later.

Our new start-up: TweetShirt

Our motto is “if it’s worth tweeting on Twitter, it’s worth wearing on a t-shirt.”

image with no caption

After all, half the battle of calling yourself a journalist is being willing to put your words in print, so what better place than printing on your or someone else’s chest? At least that’s our start-up pitch, and we’re sticking to it.

Now, there’s only ...

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required