These tutorials follow a progressive path from SVG fundamentals through production-ready techniques. Work through them in order to build a solid foundation, or jump to a topic you need.
Foundations
- What is SVG? — Vector vs. raster graphics, when to reach for SVG, and the structure of an SVG document.
-
Using SVG on the Web
— Inline SVG,
<img>,<object>, CSS background, and data URIs compared. -
Basic Shapes
—
rect,circle,ellipse,line,polyline, andpolygon. -
Paths
— The
dattribute: move, line, Bézier curves, and arcs. -
Text
— Positioning text,
tspanfor fine control, and text on a path. -
Groups & Transforms
—
<g>for grouping andtranslate,rotate,scale, andskewtransforms. -
viewBox & Coordinate System
— Responsive SVG with
viewBox,preserveAspectRatio, and the user coordinate system.
Building Blocks
- Reuse: defs, use, symbol & Markers — Define once, reference anywhere — icon systems, sprite sheets, and path markers.
-
Clipping & Masking
—
clipPathfor hard edges andmaskfor soft, luminance-based transparency. -
Gradients & Patterns
— Linear and radial gradients, tiling patterns with
patternUnits. -
Filters & Effects
— Gaussian blur, drop shadows, color matrix, and compositing with
<feBlend>.
Styling, Animation & Scripting
-
Styling SVG with CSS
—
currentColor, custom properties, the cascade, and presentation attributes vs. CSS. -
Animating SVG
— CSS transitions and keyframes, SMIL
animate, and the Web Animations API. -
Scripting SVG with JavaScript
— The SVG DOM,
createElementNS, event handling, and coordinate transforms.
Production
-
Accessibility
—
<title>,<desc>, ARIA roles, and keyboard interaction for interactive SVGs. - Optimization & Delivery — SVGO, sprite workflows, HTTP headers, and choosing the right serving strategy.