Skip to main content
Public

Share visualization

Loading preview…

SVG Fundamentals

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 Fundamentals

0
Bbarryhillier
Last edited Jan 7, 2023
Created on Jan 7, 2023
Forked from HTML Starter

This example demonstrates how to draw nested rectangles in an SVG canvas. The code uses raw SVG elements, specifically `<rect>` tags, to create a blue inner rectangle inside a light blue outer rectangle, both with rounded corners. The rectangles are styled using inline `fill` attributes and positioned via `x` and `y` coordinates. The HTML page includes minimal CSS and JavaScript structure, with the SVG markup written directly in the body. The visualization relies on the SVG rendering approach without any additional JavaScript 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