SVG Fundamentals
✓ Published0🌍 Public
This example demonstrates fundamental SVG shapes rendered directly on an HTML page, including circles, a rectangle, a line, and a path. It shows how static vector graphics can be created without any additional libraries, using only SVG elements with attributes like `cx`, `cy`, `r`, `x`, `y`, `width`, `height`, and `d` for path data. The code defines a 960x500 SVG canvas and styles each shape with fill colors, stroke colors, and stroke widths, such as a red circle, a green circle with a red border, a blue outlined rectangle, a navy line, and a black polyline. This serves as a bare minimum introduction to SVG markup within a standard HTML document.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed