Comment: HTML5 can draw many shapes. The following is the code to draw rectangles. Please refer to it.
<!DOCTYPE html><head>
<meta charset=utf-8>
<title>HTML5 Draw Rectangle</title>
<script src="<a href="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script">"></script</a>>
</head>
<script>
$(document).ready(function(){
var c=document.getElementById("drawbox");
var draw=c.getContext("2d");//Get a reference to the 2d content and call the drawing API
draw.fillStyle="#ff0000";//Method 1 specifies the fill color
draw.fillRect(0,0,300,100);//Coordinates and length and width
draw.fillStyle="rgba(0,0,255,0.5)"; //Method 2 rgb+transparency
draw.fillRect(400,0,100,100);//Coordinates and length and width
})
</script>
</body>
<canvas></canvas>
</body>
</html>
Reproduction diagram