π Public
Viewing a saved revision (read-only)
0e4d90fa9a594513aba03a21899fb5aa
Sol Lewitt reproduction
This example demonstrates the foundational construction of SVG graphics through JavaScript. It shows a single blue square rendered on an HTML page, created programmatically using the Document Object Model (DOM) API. The code first creates an SVG element with specified dimensions and a border, then appends a rectangle with set coordinates, size, and fill color using `createElementNS` and `setAttribute` methods. The example serves as a basic introduction to the SVG library's core functionality for positioning and styling shapes.
AI-generated description