Skip to main content
100%

Creating a face with SVG

✓ Published0🌍 Public
Rremyapk
Last edited Mar 11, 2020
Created on Mar 11, 2020
Forked from HTML Starter

This example draws a simple smiling face using SVG shapes. It creates a yellow circle for the head, two black circles for eyes, and an arc for the mouth, all rendered on a red background. The code uses D3 v4’s `select` and `arc` APIs to append and style the SVG elements, with fixed pixel dimensions for the viewport and explicit coordinates for each feature. The mouth is generated via the `d3.arc()` path generator with an inner and outer radius.

AI-generated description

A bare minimum HTML page.

See also React Starter.

MIT Licensed

Similar vizzes