To create a rectangle using HTML5 canvas rect() method of canvas can be used.
First two paramenters of rect() are the x and y coordinates of the top left corner of
the rectangle. Third parameter is the width of the rectangle and fourth parameter is the height of the rectangle.