🌍 Public
Viewing a saved revision (read-only)
f60b1d9c34d249cd96e4700d9842d7a7
Create SVG Use JavaScript
This example shows a simple JavaScript approach to generating SVG graphics without any external libraries. The code creates a full-window SVG element and populates it with 100 horizontal rectangle bars, each 10 pixels tall and spaced 20 pixels apart, using the W3C SVG namespace via `document.createElementNS`. The rectangles fill the entire width of the browser window, producing a basic striped pattern that demonstrates programmatic vector graphics creation and DOM manipulation through native browser APIs.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.