SVG
Vector graphics described as markup.
SVG is taught here in 12 lessons, running from Shapes and coordinates through to Performance, rendering cost and canvas trade-offs. Each lesson takes one topic, shows the working code, and links onward to the next, so the course can be read straight through in order.
| Track | Front-end Development |
| Lessons | 12 |
| Level | Beginner to intermediate |
| Reading time | about 3 hours |
| Prerequisites | Helpful, but not required: Chart.js |
Lessons
- Shapes and coordinatesThe viewBox, the eight drawing primitives, paths as a mini language, and grouping with defs and use.
- Styling with CSS and paint serversPresentation attributes versus CSS rules, fill and stroke semantics, gradients and markers, and transforms that respect the element's own box.
- Animation, embedding and accessibilitySMIL timing, CSS keyframes inside the document, the four ways to embed an SVG, and how to make graphics readable by assistive technology.
- Authoring, tooling and optimising SVG filesClean up design-tool output, configure SVGO for a real project, keep the viewBox honest, and decide between a font, a sprite and inline markup.
- Paths in depth: commands, curves and arcsRead and write path data fluently, choose between quadratic, cubic and arc curves, and use the tricks that only path data can do.
- Text, fonts and text on a pathLay out text with tspan, control baselines, put text on a curve with textPath, and handle font loading honestly.
- Transforms, clipping and maskingUnderstand the transform list and its order, set a sane transform origin, and choose between clipPath and mask for the result you want.
- Filters and visual effectsUnderstand the filter pipeline, use the primitives that earn their cost, and treat filters as the expensive feature they are.
- Responsive, fluid and data-driven SVGSet preserveAspectRatio deliberately, size SVG with CSS, and hand-draw a chart — scales, axes, marks — from real data.
- Interactivity, scripting and framework integrationHandle pointer and focus events, use hit areas and measurement APIs, and render SVG from React, Vue and Angular without hydration mismatches.
- Symbol sprites, icon systems and reuseBuild a symbol sprite, theme it with currentColor, weigh the external-file caching trade-off, and keep an icon set consistent.
- Performance, rendering cost and canvas trade-offsUnderstand what makes an SVG expensive, find the hot spots, and use a decision framework for choosing between SVG, canvas and CSS.
More in Front-end Development
HTML CSS JavaScript TypeScript HTML DOM AJAX JSON Tailwind CSS Bootstrap 5 Foundation Vue.js React Next.js Angular jQuery ECharts Chart.js Font Awesome
FAQ
How long does the SVG course take?
It has 12 lessons, about 3 hours of reading. Expect roughly twice that if you type out and run every example.
Do I need prior experience for SVG?
Not strictly. It helps to have read Chart.js first, because some lessons build on it, but every lesson explains its own assumptions.
What should I read after SVG?
Continue with Font Awesome (11 lessons), the next course in Front-end Development.