HTML & CSSIntermediate

Learn SVG

Create scalable vector graphics with SVG - shapes, paths, and animations.

4 hours
4 key concepts
2 in-depth sections
Official Docs

0 of 4 concepts completed (0%)

What You'll Learn

1.Shapes, Paths & Text

html

SVG Text ```

2.Transforms & Animations

html
<svg viewBox="0 0 200 200">
  <!-- Transforms -->
  <g transform="translate(100,100)">
    <rect x="-30" y="-30" width="60" height="60"
          fill="#6200ee" transform="rotate(45)" />

@keyframes bounce { 0%, 100% { cy: 100; } 50% { cy: 60; } }

/* Spinning loader */ .spinner { animation: spin 0.8s linear infinite; transform-origin: center; } @keyframes spin { to { transform: rotate(360deg); } }

/* Draw-on effect */ .draw-path { stroke-dasharray: 300; stroke-dashoffset: 300; animation: draw 1.5s ease forwards; } @keyframes draw { to { stroke-dashoffset: 0; } }

    ```

Code Example

<!-- SVG circle -->
<svg viewBox="0 0 100 100">
  <circle cx="50" cy="50" r="40" fill="blue"/>
  <rect x="20" y="20" width="60" height="60" fill="red" opacity="0.5"/>
</svg>

Pro Tips

  • 1Set viewBox on every SVG so it scales correctly regardless of width/height. The viewBox defines the internal coordinate system.
  • 2Use stroke-linecap='round' and stroke-linejoin='round' for softer, more modern-looking line icons.
  • 3SVG animations with CSS work everywhere and are GPU-accelerated. SMIL animations have patchy browser support avoid them.
  • 4Optimize SVGs with SVGO before shipping it typically reduces file size by 60-80% by removing unnecessary metadata.

Topics Covered

SVGVector Graphics

Continue Learning

Explore the official documentation and deepen your knowledge with real-world practice.

Explore the Full Portfolio

This is the complete portfolio of Sufi Khan Sulaiman, a technology leader specialising in B2B commerce and digital automation. Start from the Home page for the overview, then move through two decades of career experience across FLIR Systems, Lorex Technology, and 1c Platform, and the full catalogue of project case studies spanning headless commerce migrations, AI recommendation engines, and multi-channel fulfilment systems.

The skills and certifications page maps the technical and leadership capabilities behind the work, while the articles and the knowledge base break down the thinking into actionable frameworks. For hands-on learning, the tutorials and applications sections cover practical builds from front-end fundamentals to full-stack web apps.

For consulting engagement, the expertise page outlines service offerings, the ecommerce hub covers platform architecture and automation strategy, and the ecommerce guide (PDF) is a downloadable 55-page field manual. When you are ready to talk, the contact page is the direct line.