HTML Vector Graphic PATH element

The path is powerful vector graphic element and it can be used drawing lines, curves etc. We can create complex shapes with using it. In this example i will show you how we simple draw a line with path element. We have to use SVG element as container and its height and width will be 200 pixels. By the way coordinate system of the HTML is little bit different from known coordinate system. Opposite of the known system positive Y axes are down side. Path element has d attribute which is used for line direction curve and for other commands. In our simple example d has M and L. M means move, it also starting point of the path. L means draw line to a point. Our code generates following output We start with x:20, y:20 point and draw line to x:60, y:20 point and finally draw line to x:60, y:200 point.