Interactive online courses HTML Academy
2026-03-09 12:22 Diff

You can draw polylines using the polyline tag. The coordinates of points on the line can be set using the points attribute, just like they can for the polygon.

Code example:

<polyline points="10,135 100,10 55,135 10,10 105,135"/>

Result:

The difference between a polygon and a polyline is in the behavior of the stroke: for a polygon, the stroke is terminated by itself (shape on the left), while for a polyline it remains open (shape on the right):