SVG Path
The <path> is the most powerful element in SVG, capable of drawing any shape including straight lines, curves, arcs, etc.
Basic Syntax
Main Properties
Path Commands
Basic Commands
::: tip Uppercase vs Lowercase
- Uppercase letters: use absolute coordinates
- Lowercase letters: use relative coordinates (relative to current point) :::
Line Examples
Curve Commands
Bezier Curves
Cubic Bezier Curve (C)
Quadratic Bezier Curve (Q)
Arc Commands
Parameter descriptions:
rx, ry: Ellipse x and y radiirotation: Ellipse rotation anglelarge-arc: 0=small arc, 1=large arcsweep: 0=counterclockwise, 1=clockwisex, y: End point coordinates
Using CSS Styling
Practical Application Examples
Heart Shape
Wave Line
Rounded Rectangle (Custom Corners)
Speech Bubble
Pie Chart Segment
Complex Icon - House
Checkmark Animation
Next Steps
Now that you've learned paths, let's learn about SVG Text!