How to use Polyline predefine SVG shape in HTML5

In this article I have describe about a examples of Polyline in HTML5.
  • 2673

Read about SVG here

Polyline predefine SVG shape in HTML5

<polyline> is use to create a Line in any shape and any direction.

Example:

<!DOCTYPE html>

<head>

<title>SVG</title>

<meta charset="utf-8" />

</head>

<body>

<h2>HTML5 SVG Polyline</h2>

<svg id="svgelem" height="200" xmlns="http://www.w3.org/2000/svg">

 <polyline points="20,20 40,25 60,40 80,120 120,140 200,180"" fill="blue" />

</svg>

</body>

</html>

Output

polyline.jpg

Define the code

  • html define the DOCTYPE in this program.
  • Polyline points define the x and y axis of the line.
  • Stroke is define the width of line.
  • Stroke color is define the color of line.

Further Readings

You may also want to read these related articles :

Ask Your Question

Got a programming related question? You may want to post your question here

Programming Answers here

© 2020 DotNetHeaven. All rights reserved.