Skip to main content
Public

Share visualization

Loading preview…

SVG starter

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

SVG starter

0
HHamim Rahman
Last edited Feb 7, 2023
Created on Feb 7, 2023
Forked from HTML 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 description

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

See also React Starter.

Comments

Sign in to join the discussion.

MIT Licensed