Professional Documents
Culture Documents
CGPL Lecture1
CGPL Lecture1
COMPUTER
GRAPHICS
PROGRAMMING
Introduction to HTML5 Canvas
01
HTML5
HTML is the standard language used to
construct pages on the World Wide Web.
BASIC HTML5 PAGE
● A basic HTML page is divided into sections, commonly <head>
and <body>. The new HTML5 specification adds a few new
sections, such as <nav>, <article>, <header>, and <footer>.
● Between the opening and closing tags, you can put text that will
be displayed if the browser executing the HTML page does not
support Canvas. For our Canvas applications, we will use the text
“Your browser does not support HTML5 Can‐ vas.
USING THE DOCUMENT OBJECT TO REFERENCE THE CANVAS ELEMENT
IN JAVASCRIPT