Shapes with SVG and CSS
✓ Published1🌍 Public
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
MIT Licensed