SVG line Element (original) (raw)

Last Updated : 31 Mar, 2022

The SVG element is used to draw line. The start point and endpoints are given to draw the line.

Syntax:

<line x1="x-axis co-ordinate" y1="y-axis co-ordinate"

x2="x-axis co-ordinate" y2="y-axis co-ordinate" >

Attribute:

Example:

html `

SVG Line

`

Output:

Example: Change opacity of the line.

html `

SVG Line

`

Output: