🌍 Public
Viewing a saved revision (read-only)
695c2e27c97f4b70baeb1b6d7ae954ef
Shapes with SVG and CSS
This example demonstrates drawing primitive geometric shapes—circles, rectangles, lines, and a custom path—using SVG elements directly in an HTML document without any JavaScript library. CSS rules in an external stylesheet apply stroke styling, with a class selector setting line color and width. A `<g>` element uses the `transform` attribute to translate and scale a grouped collection of shapes, while inline presentation attributes assign fills and strokes. The SVG canvas is 960 by 500 pixels, and CSS sets the body to a monospace font with hidden overflow.
AI-generated descriptionCars report