Latest web development tutorials

SVG straight

SVG straight - <line>

<Line> element is used to create a straight line:

Here is the SVG Code:


<svg xmlns="" version="1.1">
<line x1="0" y1="0" x2="200" y2="200"

try it"

For Opera users: view SVG file , right-click the preview source SVG graphics).

  • x1 attribute x axis defines the beginning of a line
  • y1 in the y-axis is defined attribute start line
  • End x2 attributes defined in the x-axis line
  • y2 attributes defined in the y-axis of the end of the line