Published: 2013-02-27 06:40:31

The new HTML5 CANVAS Element is where your Game with "strut its stuff".

But the CANVAS live within a standard HTML Web Page.

This lesson just shows you how to get a CANVAS onto a Web Page. The magic about what to do in the CANVAS will come later.

element = document.getElementById(id);

element

is a reference to an Element object, or null if an element with the specified ID is not in the document.

id

is a case-sensitive string representing the unique ID of the element being sought.