HTML and CSS Reference
A.2.3. Canvas and SVG (interactive media)
programming. The first and most popular Canvas API was originally an Apple product
from Mac OS X. Developers can create raster-based graphics on the fly inside a <can-
vas> element with it. Although the <canvas> element itself is covered in the core
specification called “HTML Canvas 2D Context.” Note that although WebGL allows Can-
vas to display 3D graphics, the 3D context is not officially part of HTML5 (see sectionA.3
SVG is an XML-based language that's been around since 2001. All HTML5 adds is the
ability to inject SVG elements into HTML pages (it has always been allowed to inject SVG
into XHTML pages), nothing more. It's important to understand that SVG is a piece of
HTML5 but not a specification created by it.
HTML5 is associated with several storage-based APIs; the ones that are part of the HTML5
specifications are Web Storage and Offline Applications.
At W3C, offline apps are covered in the core HTML5 spec, and session and local storage
are covered by the Web Storage spec. Both are discussed in chapter 5 .
Web Messaging (cross-document and channel messaging), Server-Sent Events, and We-
bSockets are all core HTML5 technologies. At W3C they are covered by three specs:
“HTML5 Web Messaging,” “Server-Sent Events,” and “WebSockets API.” Note that the
WebSockets Protocol, which describes the format of the transmitted data, is defined by
a specification at the Internet Engineering Task Force (IETF). Messaging is covered in