🌍 Public
Viewing a saved revision (read-only)
91995f2f7c8a4669b1bbf989ff8873a0
Traffic Light in SVG
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 descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.