Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Shapes with SVG and CSS

Public visualization

Viewing a saved revision (read-only)

4c4faf2f400a4c7db894055a6c1bf8cd

Shapes with SVG and CSS

0 stars1🌍 Public
Aavssvd
Last edited Feb 25, 2021
Created on Feb 25, 2021
Forked from HTML Cars Report

This example demonstrates how to create and style basic SVG shapes—circles, rectangles, lines, and paths—using inline attributes and CSS classes. It shows how CSS rules, such as setting stroke width and color on a group with class `lines`, can apply consistent styling to multiple elements. The code uses raw SVG markup within an HTML page, with a linked `styles.css` for presentation. A transform on the outer group scales and translates the entire composition, while nested groups inherit fill and stroke properties, illustrating SVG’s grouping and inheritance model.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.