Draw a rectangle on the HTML5 canvas

Fetches the canvas element. Creates a 2D context. Clears the canvas, then sets the fill style to red and then fills the rectangle with the selected color.