Skip to main content
100%

shapes with SVG and CSS

✓ Published1🌍 Public
RRemy-dev
Last edited Jan 13, 2022
Created on Jan 13, 2022
Forked from HTML Starter

This example visually demonstrates how CSS classes and inline presentation attributes combine to style SVG shapes such as circles, rectangles, lines, and paths. The markup uses plain SVG elements within a single `svg` container, with styling applied through both inline attributes like `fill` and `stroke-width` and a CSS class (`.lines`) that sets stroke properties. The code relies on native SVG APIs and CSS, with a minimal JavaScript file that writes "Hello world" into the page. The rendering approach is direct SVG, showing how grouped elements (`<g>`) can inherit and override visual properties.

AI-generated description

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

See also React Starter.

MIT Licensed

Similar vizzes