Learn how Visual Studio 11 powers HTML5 development with new tooling and framework features. We’ll dive into some HTML5 specifics like the drawing capabilities of canvas, the geolocation API, HTML5 local storage and offline web applications.
7. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-str
<!DOCTYPE html />
8.
9.
10. “a resolution-dependent bitmap canvas which can
be used for rendering graphs, game graphics, or
other visual images on the fly.”
<canvas width="300" height="225">
Fallback content if canvas not available
</canvas>
11. <canvas id="simple_shape" width="300" height="225“
onclick="draw_simple_shape()">
</canvas>
function draw_simple_shape() {
var canvas = document.getElementById("simple_shape");
var context = canvas.getContext("2d");
context.fillRect(20, 20, 50, 50);
}