Skip to main content
100%

SVG fundamentals

✓ Published1🌍 Public
Sslyfer-cell
Last edited Jun 4, 2022
Created on May 23, 2022
Forked from HTML Starter

This example demonstrates the fundamental building blocks of SVG by constructing a single rectangle using raw DOM manipulation. The code programmatically creates an SVG element and a rect child node via the `document.createElementNS` API, setting explicit width and height attributes of 960 by 500 pixels for the canvas and 100 by 100 for the shape. It shows how to manually build SVG graphics without any visualization library, relying solely on native browser methods and CSS styling for the page layout. The rectangle is appended directly to the body, illustrating the basic SVG creation workflow.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes