js picture
✓ Published0🌍 Public
This example shows a simple SVG canvas with a single black rectangle placed at the top-left corner of a 960 by 500 pixel drawing area. The code creates the SVG element and the rectangle programmatically using the DOM API and SVG namespace methods. It uses native JavaScript DOM manipulation with `document.createElementNS` and `setAttribute` calls, and appends elements to the document body. No external libraries or data sources are involved; it demonstrates the minimum setup for drawing shapes with pure JavaScript.
AI-generated descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.
MIT Licensed