Shapes with SVG and CSS
✓ Published3🌍 Public
This example demonstrates how to create basic geometric shapes—circles, rectangles, and a line—using SVG elements within an HTML page. It shows how to apply CSS styling through an external stylesheet and how to use inline presentation attributes like `fill` and `stroke` to control color and borders. The code also groups shapes inside an SVG `<g>` element to apply consistent styling and a transformation. The page uses native SVG markup inside a React-rendered `index.html`, with the `style.css` file enforcing layout rules such as zero margins and hidden overflow.
AI-generated descriptionA bare minimum HTML page.
See also React Starter.
MIT Licensed