SVG Styling & Effects

Beginner
7 min read
Updated: Nov 2026
5 topic guides
Appearance hub

Definition

Styling & effects covers how SVG shapes look after you draw them: stroke outlines, filter effects, patterns, and linear or radial gradients.

After Basic Shapes, open Stroke and Filters, then Patterns and gradients.

Beginner path.

Stroke first → filters → patterns → linear gradient → radial gradient.

Syntax

A stroked circle with a simple linear fill:

SVG
<svg viewBox="0 0 200 120" xmlns="http://www.w3.org/2000/svg">
  <defs>
    <linearGradient id="g" x1="0" y1="0" x2="1" y2="0">
      <stop offset="0%" stop-color="#2563eb"/>
      <stop offset="100%" stop-color="#16a34a"/>
    </linearGradient>
  </defs>
  <circle cx="100" cy="60" r="40"
    fill="url(#g)" stroke="#0f172a" stroke-width="4"/>
</svg>

Topics

Guides in the Styling & Effects section (5 tutorials).

Outline & filters

2 topics

Control edges and visual effects on existing shapes.

TopicDescriptionTutorial
Strokestroke, stroke-width, dasharray, linecap, and linejoin.Open
FiltersBlur, drop shadow, and other filter primitives.Open

Fills

3 topics

Paint interiors with tiles and color ramps.

TopicDescriptionTutorial
PatternsRepeating pattern fills with patternUnits.Open
Linear GradientslinearGradient and stop offsets.Open
Radial GradientsradialGradient for circular color ramps.Open

Live Preview

Adjust stroke width and a gradient mid stop on one circle.

6
50

Fill uses a linearGradient; outline uses stroke-width.

SVG

stroke-width="6" mid="50%"

How to Learn Styling & Effects

A practical order for this hub:

  1. Finish a few shapes from Basic Shapes.
  2. Style outlines with stroke and stroke-width.
  3. Try dasharray, linecap, and linejoin.
  4. Add a simple blur or drop-shadow filter.
  5. Paint with pattern, then linear and radial gradients.
  6. Continue to Advanced for clicks and links.

Frequently Asked Questions

How SVG shapes look: stroke width and dash patterns, filter effects, tiled patterns, and linear or radial gradient fills.
Related idea, different model. stroke paints along a shape’s outline. You control color, width, linecap, linejoin, and dashes — not a CSS box border.
Usually inside <defs>. Reference them with fill="url(#id)" or stroke="url(#id)" on the shape.
Yes. Apply filter="url(#id)" to shapes, groups, or text. Some filters are heavier — keep demos simple while learning.
Learn stroke first so outlines look intentional. Then patterns and gradients for richer fills.
This page is the index for the Styling & Effects sidebar section. Each topic page has full syntax, live demos, examples, and FAQs.

Start with SVG Stroke

Open the stroke guide — width, dashes, live preview, and examples.

Stroke →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

8 people found this page helpful