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

SVG line

SVG line Bad Practice
SVG line Best Practice

The <line> element seems like a simple shape but requires 4 attributes. You define the x (x1; x2) and y (y1; y2) coordinates for two points connecting and forming a line. The <line> element also has the stroke attribute that specifies the stroke color and width. If you omit these parameters, the line will be invisible.

Top contributors

Frank Benedik

Topics

From Lesson

Share

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