Getting started
Images
Path syntax
Media types and the canvas
Animation
Collisions and intersections
Paths
Text
Clearing the screen
Navigating along a path
Dragging path shapes images
Shadows
Charts diagrams
Polygons
Transformations
Responsive design
Compositing
Pixel manipulation
Contributors

Hello World

suggest change

HTML

<canvas id="canvas" width=300 height=100 style="background-color:#808080;">
</canvas>

Javascript

var canvas = document.getElementById("canvas");
var ctx = canvas.getContext("2d");
ctx.font = "34px serif";
ctx.textAlign = "center";
ctx.textBaseline="middle"; 
ctx.fillStyle = "#FFF";
ctx.fillText("Hello World",150,50);

Result

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents