Menu Home

line

osbo.com | SVG | Elements | line

The line SVG element specifies a line segment that starts at one point and ends at another.

Syntax

Attributes

pathLength

Specifies the total length of the path in user units.

Value
<number>
Default
(none)

x1

Specifies the x-coordinate of the start of the element.

Value
<length-percentage> | <number>
Default
0

x2

Specifies the x-coordinate of the end of the element.

Value
<length-percentage> | <number>
Default
0

y1

Specifies the y-coordinate of the start of the element.

Value
<length-percentage> | <number>
Default
0

y2

Specifies the y-coordinate of the end of the element.

Value
<length-percentage> | <number>
Default
0

Examples

pathLength

<number>

x1

<length-percentage>

<number>

x2

<length-percentage>

<number>

y1

<length-percentage>

<number>

y2

<length-percentage>

<number>

Internal

circle

ellipse

polygon

polyline

rect

External

World Wide Web Consortium (W3C)