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
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
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 like this
Build a Flip-Card Science Vocabulary Infographic in a Single HTML File
You get a ready-to-open HTML page with twelve cell-biology vocabulary cards that flip to show a definition, a real example and an emoji icon, plus shuffle, reveal-all and keyboard controls.
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.
Build a Classroom Grade Distribution Infographic with Histogram and Quartiles
A single HTML file that turns an inline array of class scores into a histogram with mean and median markers, a box plot, stat cards and a plain-language summary.
Build a Color-Coded Parts of Speech Grammar Cheat Sheet in One HTML File
A prompt that builds an interactive grammar cheat sheet where every word in the example sentences is colored by part of speech, and hovering or tapping a word explains why it fits that category.
Build a Mitosis vs Meiosis Comparison Infographic in a Single HTML File
Get a ready-to-open infographic that lines up mitosis and meiosis phase by phase, with SVG cell diagrams and a toggle that highlights only the differences.
Build a Product Feature Comparison Matrix with Checkmarks in One HTML File
A prompt that produces an accessible, filterable feature comparison table for four competing products, with sticky headers, symbol-plus-text cells and a show-only-differences toggle.