Shapes with SVG and CSS
✓ Published1🌍 Public
This example demonstrates how to create simple geometric shapes—a circle and a rectangle—using inline SVG elements within an HTML page, with CSS applied for styling. The SVG canvas is set to 960 by 500 pixels, and the shapes are positioned using explicit `cx`, `cy`, `x`, and `y` attributes. The stylesheet defines a `highlighted` class that turns text red, while the body margin is reset for a clean display. The rendering relies on native SVG markup and CSS rules, with no external JavaScript libraries or data sources involved.
AI-generated descriptionMIT Licensed