HTML and CSS Reference
YOUR SITE WITH
ONE OFTHE most important additions to
HTML5 is the <canvas> tag. With it, you can
draw just about anything on an HTML5 page.
With just two attributes, width and height ,
there's not a lot to remember about attributes.
However, the canvas element is implemented in
what might be called a Document Object Model
(DOM) style. Chapter 12 describes the DOM in
detail. Essentially, DOM style means writing the
their methods and properties.
assigning values to properties, and since you
know how to do that from assigning values to
attributes — height=”200” , for instance —
there's less that's new about writing this kind of
code than you may think.
what you might call “OOP Lite.” h e DOM
represents object oriented programming (OOP)
in that all references are to dif erent objects and
using a similar style — creating objects and then
assigning them properties and methods — your
code will look a lot like expressions taken from
If that kind of talk has you quaking in your
l ip-l ops, relax. h roughout the topic, the
HTML5 tags (elements) have used attributes, and
attributes are just properties of the elements. For