Viewing a saved revision (read-only)
f456bacf7a584f6a82f6f39c9c588976
SVG Fundamentals
This example demonstrates the basic building blocks of SVG graphics by rendering three distinct shapes: a black circle with a red companion, a thick navy diagonal line, and an open polyline path. The code uses raw SVG elements—`circle`, `line`, and `path`—to construct the visual scene. It defines each shape’s geometry through attributes like `cx`, `cy`, `r`, `x1`, `y1`, and the path’s `d` data, with styling applied via `fill`, `stroke`, and `stroke-width`. The shapes are placed directly inside an `svg` viewport of 900 by 500 pixels, showcasing how SVG’s XML-based structure maps coordinates to the canvas.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.