Build a How a Bill Becomes a Law Branching Flowchart in a Single HTML File

Get a one-file interactive civics flowchart that traces a U.S. bill from introduction to law, showing every point where it can fail or be vetoed, with click-to-expand notes and a text outline.

The prompt

Prompt
Act as a civics teacher who is also a front-end developer and information designer. Build "From Bill to Law", an interactive branching flowchart of the U.S. federal lawmaking process for a middle or high school civics class. The main path runs top to bottom through eight steps: introduction, committee review, first chamber vote, second chamber, reconciling versions, the President's desk, veto override, and becoming law. Beside each step, branch nodes show where a bill can die, be vetoed, or take another route, including dying in committee, a failed floor vote, a pocket veto, the ten-day rule and a failed override. Rules: 1) Every step and branch is a real button that expands a short, plain-language note on click, tap, Enter or Space, using aria-expanded, and Up and Down arrow keys move focus between nodes. 2) Add Expand all and Collapse all controls plus a color legend: navy for main steps, red for failure, amber for veto, green for routes that end in law. 3) On wide screens branches sit to the right of their step with a dashed connector; below 680px they stack under the step, indented. 4) Label each down arrow with the condition, such as passes by majority. 5) Below the chart, add an accessible ordered-list text outline with the same content. 6) Use system fonts, strong contrast and no motion when prefers-reduced-motion is set. 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: From Bill to Law, a branching civics flowchart.

Eight numbered steps run down the page from Bill is introduced to Becomes law. Red, amber and green branch cards show where a bill can die, be vetoed or slip into law under the ten-day rule. Click or tap any card, or press Enter, to read a short note. Use Expand all for projector review, arrow keys to move between cards, and scroll down for the full text outline.

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

Tips and common edits

Why this works

  • Naming all eight steps and each failure branch fixes the content, so the model doesn't invent or skip stages of the process.
  • Real buttons with aria-expanded plus a mirrored text outline make the chart usable with screen readers and keyboards.
  • A fixed color legend and a 680px stacking rule keep the branching readable on phones and on classroom projectors.

Paste into ChatGPT, Claude or Gemini. Save the returned code as bill-to-law.html and open it in any browser, or view it in the chat's preview or canvas panel. Works offline, so it is fine for classroom projectors.

Common edits

  • Swap the steps for your state legislature, or for another government's process, such as parliament's readings and royal assent.
  • Add a quiz mode that hides the notes and asks students to predict what happens at each branch.

Prompt details

By
Prompts-GPT editors
Published

Did this prompt work?

Keep exploring

More in Infographics