Skip to main content
100%

Traffic Light in SVG

✓ Published0🌍 Public
Ttruenicfel
Last edited Oct 11, 2023
Created on Oct 11, 2023
Forked from HTML Starter

This example shows a static traffic light constructed entirely with inline SVG shapes, including a grey pole and red, yellow, and green circles. The code uses raw SVG elements like `rect` and `circle` directly within an HTML page, styled with a minimal CSS rule that removes the default body margin. It uses no JavaScript or external libraries, demonstrating how SVG alone can create simple visual representations. The accompanying text notes that dynamic color changes would require JavaScript, which this illustration omits.

AI-generated description

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

See also React Starter.

MIT Licensed

Similar vizzes