<?xml version="1.0" encoding="utf-8"?>

SVG line

SVG line

The <line> element is a basic SVG shape used to create a line between two points. Remember to specify the stroke attribute that specifies the fill color; otherwise, no one will see the line on a web-page. In the provided example, we also used the stroke-dasharray attribute to define the pattern of dashes and gaps.

Improve your UX & Product skills with interactive courses that actually work