Skip to main content
100%

Shapes with SVG and CSS

✓ Published1🌍 Public
Aant999
Last edited Mar 31, 2020
Created on Mar 31, 2020
Forked from HTML Starter

This example demonstrates basic SVG shapes—circles, rectangles, lines, and paths—styled with CSS and inline attributes. It shows how presentational properties like `fill`, `stroke`, and `stroke-width` can be set directly on SVG elements or inherited from a parent `<g>` group. The code uses plain React-rendered SVG without additional libraries, featuring a static composition of colored and outlined shapes. CSS resets the page margin and hides overflow, while styles are applied via an external stylesheet. The visualization highlights fundamental SVG syntax, including coordinate attributes and the `<path>` `d` command.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes