Baseline Widely available *
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
* Some parts of this feature may have varying levels of support.
The
SVG element is the generic element to define a shape. All the basic shapes can be created with a path element.
Usage context
Categories | Graphics element, Shape element |
---|---|
Permitted content | Any number of the following elements, in any order: Animation elements Descriptive elements |
Attributes
d
-
This attribute defines the shape of the path. Value type:
; Default value: ''
; Animatable: yes pathLength
-
This attribute lets authors specify the total length for the path, in user units. Value type:
; Default value: none; Animatable: yes
DOM Interface
This element implements the SVGPathElement
interface.
Example
html
Specifications
Specification |
---|
Scalable Vector Graphics (SVG) 2 # PathElement |
Browser compatibility
See also
- SVG basic shapes:
,
,
,
,
, - The MDN SVG "Getting Started" tutorial: Path