Tutorials

KodeKite Tools

HTML
Flexbox
SVG
Canvas
More


SVG Polyline
SVG Polyline

SVG Polyline is used to draw polylines on webpage, it uses <polyline> element to draw a polylines. Polyline has some attributes such as points, stroke, stroke-width, fill etc. These attributes help polyline to draw a polylines on a page.

Syntax

<polyline points="values" stroke="color" fill="color"> </polygon>


You can define one or more than one SVG polylines in a document.


Example

Sorry, your browser does not support SVG element.
Stroke Width

Stroke width attribute is used to make stroke thick and bold, it takes value in number.

Syntax

<polyline points="values" stroke="color" stroke-width="value" fill="color"> </polyline>


You can define one or more than one attributes in SVG polyline.


Example

Sorry, your browser does not support SVG element.

You can use SVG polyline any where within an HTML document.


Practice Task

Open notepad or any other text editor, follow the following points.


  • Use <svg> element to draw svg polyline on webpage
  • Give width and height of 300 300 respectivelly to SVG element
  • Fill color should be olive

save file with name task.html or task.htm and then open it using any browser and see results.


Solution

Sorry, your browser does not support SVG element.

SVG Code Generators

Try our SVG generators to practice and generate SVG code in real time.