Build an Animated Water Cycle Step-by-Step Explainer in a Single HTML File

You get one self-contained HTML page with an animated SVG water cycle that walks through five stages, each in one sentence, with next, previous and play controls.

The prompt

Prompt
Act as a front-end developer who designs clear science explainers for middle-school students. Build "Rain Loop: How the Water Cycle Works", a step-by-step animated infographic in one HTML file. Draw an inline SVG scene (viewBox 800 by 450) with a sun, an ocean, green land with a soil cross-section, a snow-capped mountain, a river, a tree and two clouds. Walk through five stages in order: Evaporation, Transpiration, Condensation, Precipitation and Collection, each narrated in exactly one plain sentence.

Rules:
1. Controls: Previous, Next, a Play/Pause loop button that advances every 5 seconds, and a Motion on/off toggle. Add a row of numbered stage buttons. Left and Right arrow keys step, Space plays or pauses, and clicking a stage label inside the SVG jumps to that stage.
2. The active stage's effects light up at full opacity: rising vapour wisps, dashed flow arrows, droplets forming in darkening clouds, falling rain, and a flowing river and groundwater line. All other effects fade to a faint preview.
3. Below the picture, show the stage name, a colored number badge, the step count out of 5 and the sentence in an aria-live region.
4. Use CSS keyframe animation only. Under prefers-reduced-motion, start with motion off and keep every element visible but still.
5. The layout fits 360 to 1280px wide, the SVG scales with the width, and buttons are at least 44px tall. Use dark navy text on white for strong contrast.
6. Do not use external files, fonts, storage or dialogs.

Output format: one complete HTML file in a single code block, then 3 short ideas to extend it.

Example output

One HTML file. Save it and open it in any browser.Open full screen

Example: Rain Loop, an animated step-by-step water cycle explainer.

The page shows an SVG landscape with a sun, ocean, mountain, tree and clouds. Press Next or Previous, or use the arrow keys, to move through Evaporation, Transpiration, Condensation, Precipitation and Collection. Each stage lights up its own animation and one-sentence explanation. Press Play loop or Space to auto-advance, tap labels in the picture to jump, and use Motion: off to freeze the animation.

Written by AI from this prompt. Your results will vary.

Tips and common edits

Why this works

  • Naming every scene element and all five stages up front gives the model a fixed checklist, so nothing is missing from the diagram.
  • Tagging each effect with its stage numbers keeps the logic to one toggle loop, which avoids fragile per-stage code.
  • Requiring CSS-only animation plus a motion toggle makes reduced-motion support simple and reliable on the first try.

Paste the prompt into ChatGPT, Claude or Gemini. Save the returned code as water-cycle.html and open it in any browser, or view it in the chat's preview or canvas panel.

Common edits

  • Change the topic and stages to another process, such as photosynthesis, the rock cycle or the carbon cycle, keeping one sentence per step.
  • Adjust the auto-play interval or add a short quiz question after the final stage for classroom use.

Prompt details

By
Prompts-GPT editors
Published

Did this prompt work?

Keep exploring

More in Infographics