Drawing Straight Lines with SVG-Path

loading views

There are two important line commands to draw an SVG-Path with only straight lines.

M can be used to move the virtual cursor to a certain position.

M x y
(or)
m dx dy

To actually draw a straight path from a to b there is the L command:

L x y
(or)
l dx dy

Code

<svg width="200" height="200" viewPort="0 0 200 200">
    <path d="M0 0 L0 200 L200 200 L200 0 L0 0" stroke="pink">
</svg>

Demo