🌍 Public
Viewing a saved revision (read-only)
29af5fe0e00b43fd9b4f71639db9a881
SVG starter
This example displays a single empty SVG canvas with a small black square in the upper-left corner, created entirely through JavaScript. The code uses the Document API’s `createElementNS` method to construct the SVG namespace elements and `setAttribute` to set the canvas dimensions (960 by 500) and the rectangle’s size (100 by 100). The SVG is appended directly to the page body, with no external data source or interaction, demonstrating the lowest-level programmatic approach to SVG generation without any helper libraries.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.