SVG Line

From http://www.w3schools.com (Copyright Refsnes Data)

# SVG <line>

The <line> tag is used to create a line.

## The <line> Tag

The <line> tag is used to create a line.

Copy the following code into Notepad and save the file as "line1.svg". Place the file in your Web directory:

    <?xml version="1.0" standalone="no"?>
    <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
    "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">

    <svg width="100%" height="100%" version="1.1"
    xmlns="http://www.w3.org/2000/svg">

    <line x1="0" y1="0" x2="300" y2="300"
    style="stroke:rgb(99,99,99);stroke-width:2"/>

    </svg>

Code explanation:

- The x1 attribute defines the start of the line on the x-axis
- The y1 attribute defines the start of the line on the y-axis
- The x2 attribute defines the end of the line on the x-axis
- The y2 attribute defines the end of the line on the y-axis

View example

From http://www.w3schools.com (Copyright Refsnes Data)