Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

Revision 1047004 of <polyline>

  • Revision slug: Web/SVG/Element/polyline
  • Revision title: <polyline>
  • Revision id: 1047004
  • Created:
  • Creator: Tigt
  • Is current revision? No
  • Comment

Revision Content

{{SVGRefElem}}

The polyline element is an SVG basic shape that creates straight lines connecting several points. Typically a polyline is used to create open shapes as the last point doesn't have to be connected to the first point. For closed shapes see the {{SVGElement("polygon")}} element.

Usage context

{{svginfo}}

Example

Source code Output result
{{embed_text("polyline.svg", "xml")}} {{EmbedSVG("polyline.svg",120,120)}}

» polyline.svg

Attributes

Global attributes

Specific attributes

  • {{SVGAttr("points")}}

DOM Interface

This element implements the SVGPolylineElement interface.

Specifications

Specification Status Comment
{{SpecName('SVG2', 'shapes.html#PolylineElement', '<polyline>')}} {{Spec2('SVG2')}}  
{{SpecName('SVG1.1', 'shapes.html#PolylineElement', '<polyline>')}} {{Spec2('SVG1.1')}} Initial definition

Browser compatibility

{{CompatibilityTable}}

Feature Chrome Firefox (Gecko) IE Opera Safari
Basic support {{CompatChrome('1.0')}} {{CompatGeckoDesktop('1.8')}} {{CompatIE('9.0')}} {{CompatOpera('8.0')}} {{CompatSafari('3.0.4')}}
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support {{CompatAndroid('3.0')}} {{CompatGeckoMobile('1.8')}} {{CompatNo}} {{CompatVersionUnknown}} {{CompatSafari('3.0.4')}}

The chart is based on these sources.

See also

  • {{SVGElement("line")}}
  • {{SVGElement("polygon")}}

{{SVGRef}}

Revision Source

<div>{{SVGRefElem}}</div>

<p>The <strong><code>polyline</code></strong> element is an SVG basic shape that creates straight lines connecting several points. Typically a <code>polyline</code> is used to create open shapes as the last point doesn't have to be connected to the first point. For closed shapes see the {{SVGElement("polygon")}} element.</p>

<h2 id="Usage_context">Usage context</h2>

<p>{{svginfo}}</p>

<h2 id="Example">Example</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Source code</th>
   <th scope="col">Output result</th>
  </tr>
  <tr>
   <td>{{embed_text("polyline.svg", "xml")}}</td>
   <td>{{EmbedSVG("polyline.svg",120,120)}}</td>
  </tr>
 </tbody>
</table>

<p>» <a href="https://developer.mozilla.org/files/3260/polyline.svg">polyline.svg</a></p>

<h2 id="Attributes">Attributes</h2>

<h3 id="Global_attributes">Global attributes</h3>

<ul>
 <li><a href="/en-US/docs/Web/SVG/Attribute#ConditionalProccessing">Conditional processing attributes</a>&nbsp;»</li>
 <li><a href="/en-US/docs/Web/SVG/Attribute#Core">Core attributes</a>&nbsp;»</li>
 <li><a href="/en-US/docs/Web/SVG/Attribute#GraphicalEvent">Graphical event attributes</a>&nbsp;»</li>
 <li><a href="/en-US/docs/Web/SVG/Attribute#Presentation">Presentation attributes</a>&nbsp;»</li>
 <li>{{SVGAttr("class")}}</li>
 <li>{{SVGAttr("style")}}</li>
 <li>{{SVGAttr("externalResourcesRequired")}}</li>
 <li>{{SVGAttr("transform")}}</li>
</ul>

<h3 id="Specific_attributes">Specific attributes</h3>

<ul>
 <li>{{SVGAttr("points")}}</li>
</ul>

<h2 id="DOM_Interface">DOM Interface</h2>

<p>This element implements the <code><a href="/en-US/docs/Web/API/SVGPolylineElement">SVGPolylineElement</a></code> interface.</p>

<h2 id="Specifications">Specifications</h2>

<table class="standard-table">
 <thead>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Status</th>
   <th scope="col">Comment</th>
  </tr>
 </thead>
 <tbody>
  <tr>
   <td>{{SpecName('SVG2', 'shapes.html#PolylineElement', '&lt;polyline&gt;')}}</td>
   <td>{{Spec2('SVG2')}}</td>
   <td>&nbsp;</td>
  </tr>
  <tr>
   <td>{{SpecName('SVG1.1', 'shapes.html#PolylineElement', '&lt;polyline&gt;')}}</td>
   <td>{{Spec2('SVG1.1')}}</td>
   <td>Initial definition</td>
  </tr>
 </tbody>
</table>

<h2 id="Browser_compatibility">Browser compatibility</h2>

<p>{{CompatibilityTable}}</p>

<div id="compat-desktop">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Chrome</th>
   <th>Firefox (Gecko)</th>
   <th>IE</th>
   <th>Opera</th>
   <th>Safari</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{CompatChrome('1.0')}}</td>
   <td>{{CompatGeckoDesktop('1.8')}}</td>
   <td>{{CompatIE('9.0')}}</td>
   <td>{{CompatOpera('8.0')}}</td>
   <td>{{CompatSafari('3.0.4')}}</td>
  </tr>
 </tbody>
</table>
</div>

<div id="compat-mobile">
<table class="compat-table">
 <tbody>
  <tr>
   <th>Feature</th>
   <th>Android</th>
   <th>Firefox Mobile (Gecko)</th>
   <th>IE&nbsp;Phone</th>
   <th>Opera Mobile</th>
   <th>Safari Mobile</th>
  </tr>
  <tr>
   <td>Basic support</td>
   <td>{{CompatAndroid('3.0')}}</td>
   <td>{{CompatGeckoMobile('1.8')}}</td>
   <td>{{CompatNo}}</td>
   <td>{{CompatVersionUnknown}}</td>
   <td>{{CompatSafari('3.0.4')}}</td>
  </tr>
 </tbody>
</table>
</div>

<p>The chart is based on <a href="/en-US/docs/Web/SVG/Compatibility_sources">these sources</a>.</p>

<h2 id="See_also">See also</h2>

<ul>
 <li>{{SVGElement("line")}}</li>
 <li>{{SVGElement("polygon")}}</li>
</ul>

<p>{{SVGRef}}</p>
Revert to this revision