Build a Labeled Solar System Scale Infographic with Planet Fact Cards in HTML

A single HTML file that switches the solar system between a readable view and a true-distance view, with clickable planet fact cards and a live scale check.

You getone complete HTML file in a single code block, then 3 short ideas to extend it.

The prompt

Prompt
You are a front-end developer and science-education designer. Build "Orbit Ruler," a one-page infographic that shows the Sun and the eight planets in a row. Students can switch between a readable view and a true-distance view to see why textbook diagrams distort scale.

Content: Mercury to Neptune with accurate rounded data. For each planet include diameter in km, size compared with Earth, distance in AU and in million km, length of day, length of year, known moons, sunlight travel time, and one surprising fact.

Rules:
1. Add a two-button segmented toggle. "Readable view" spaces the planets evenly, sizes them by the square root of diameter, shows a large Sun arc at the left edge and a "not to scale" badge. "True distances" places the planets in proportion to AU along a 0-30 AU axis, with the dots enlarged and labeled as enlarged. The S key also toggles.
2. Animate between views in about 0.9 s. Switch instantly under prefers-reduced-motion.
3. Under the chart, show a live "scale check" sentence. Calculate it from the current pixel sizes: how far away Earth would really be in pixels and chart widths, or how wide the Sun and Earth would really be.
4. Clicking a planet or a chip button opens its fact card. Arrow keys move between the chips.
5. In the true view, replace the crowded inner-planet labels with one bracket labeled Mercury to Mars.
6. Use a dark navy palette with one gold accent, system fonts and inline SVG only. Make the layout responsive from 360 to 1280 px and redraw on resize.

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: Orbit Ruler, a solar system infographic shown at two scales.

The page opens in Readable view: the planets sit evenly spaced beside a big Sun arc. Click True distances (or press S) and they glide out to their real AU positions, while Mercury to Mars bunch up near the Sun. The gold scale check line updates with the real numbers for each view. Click any planet or chip, or use the arrow keys, to open its fact card.

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

Tips and common edits

Why this works

  • Naming two exact layouts (square-root sizes vs AU positions) gives the model formulas, not vague art direction, so the scale contrast appears first time.
  • The live scale-check sentence turns the visual into a lesson by computing real pixel distances from the current drawing.
  • Chip buttons alongside the SVG keep tiny true-scale planets clickable and keyboard reachable.

Paste the prompt into ChatGPT, Claude or Gemini. Save the returned code as orbit-ruler.html and open it in any browser, or view it in the chat's canvas or preview. No internet or installs needed.

Common edits

  • Add Pluto, Ceres and the asteroid belt as extra entries, or swap the facts for ones aligned with your curriculum.
  • Add a third True sizes view that draws the planets at real relative diameters next to a slice of the Sun.

Prompt details

By
Prompts-GPT editors
Published

Did this prompt work?

Keep exploring

More in Infographics