HTML5 Canvas tutorials:
Create basic rectangle
Learn
Create many rectangles
Edit rectangle vertex
create new polygon adding new vertex.
Drag polygons in the canvas