For anyone wanting to do graphics in web pages I would recommend looking into the canvas tag. Example code:
with (context) {
beginPath();
moveTo(100, 100);
lineTo(100, 300);
lineTo(300, 300);
closePath();
stroke();
}