Key Ideas
1Inline SVG vs <img> vs CSS. There are three ways to use SVG. Your choice depends on whether you need CSS styling, animation, or just a static image:
2Basic Shapes. SVG has six basic shape elements. All accept fill (inside color) and stroke/stroke-width (border) attributes — or inherit them from CSS.
3viewBox — The SVG Coordinate System. viewBox defines the internal coordinate system: viewBox="min-x min-y width height". The SVG scales its contents to fill the width/height of the element while preservin...
4Accessible SVG. SVG accessibility depends on whether the graphic conveys information or is purely decorative: