<path>
Baseline Widely available *
This feature is well established and works across many devices and browser versions. It’s been available across browsers since January 2020.
* Some parts of this feature may have varying levels of support.
The <path>
SVG element is the generic element to define a shape. All the basic shapes can be created with a path element.
Example
html
<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg">
<path
d="M 10,30
A 20,20 0,0,1 50,30
A 20,20 0,0,1 90,30
Q 90,60 50,90
Q 10,60 10,30 z" />
</svg>
Attributes
d
-
This attribute defines the shape of the path. Value type: <string> ; Default value:
''
; Animatable: yes pathLength
-
This attribute lets authors specify the total length for the path, in user units. Value type: <number> ; Default value: none; Animatable: yes
Usage context
Categories | Graphics element, Shape element |
---|---|
Permitted content | Any number of the following elements, in any order: Animation elements Descriptive elements |
Specifications
Specification |
---|
Scalable Vector Graphics (SVG) 2 # PathElement |
Browser compatibility
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
path | ||||||||||||
d | ||||||||||||
d as CSS property supports path() | ||||||||||||
fill | ||||||||||||
context-fill value | ||||||||||||
systemLanguage |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- No support
- No support
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
See also
- SVG basic shapes:
<circle>
,<ellipse>
,<line>
,<polygon>
,<polyline>
,<rect>
- The MDN SVG "Getting Started" tutorial: Path