The SVG Line is used to draw lines in SVG format. Element <line> has other attributes too like a stroke for specifying the color of the stroke and the stroke width for specifying the thickness of the width.
Attributes
x1: Defines the starting point of the line on the x-axis.
y1: Defines the starting point of the line on the y-axis.
x2: Defines the ending point of the line on the x-axis.
y2: Defines the ending point of the line on the y-axis.
stroke: Specifies the color of the stroke (outline) of the line.
stroke-width: Specifies the thickness or width of the line.
Example 1: This example shows an SVG <line> element with a stroke color.