Build a Working Local Web Tool from a Screenshot with ChatGPT
A screenshot describes how an interface looks. It rarely specifies what the controls must do. In this tutorial, an original focus-budget screenshot becomes a working local HTML calculator through a separate behavior contract, source review and browser checks. The arithmetic gives us a result to verify independently of the design.
Separate appearance from behavior
Use an image you have permission to share, and attach it to a new ChatGPT conversation. The fictional tool has three inputs: available minutes, number of tasks and minutes per task. Required time is the task count multiplied by task duration. Subtract required time from available time to show either time remaining or a deficit.
Build one self-contained HTML file from this original screenshot.
Use visible labels and keyboard form submission.
Available minutes must be finite and nonnegative.
Task count must be a nonnegative whole number.
Minutes per task must be finite and greater than zero.
Accept decimal minute values and zero tasks; reject blanks.
Show required minutes plus remaining minutes or a deficit.
Use no external libraries, network requests or remote services.
Keep the page usable at a narrow phone width.Ask for the complete file, save it as index.html in a disposable folder and read its HTML and JavaScript before opening it. Check for external scripts, form destinations, fetch calls or tracking resources. A local file is not automatically a promise that it sends no data.
Check the ordinary case and the deficit
Open the reviewed file in a browser. With 90 available minutes, six tasks and 12 minutes per task, the expected required time is 72 minutes and the remainder is 18. Change only the task count to ten: required time becomes 120 minutes and the page must report a 30-minute deficit.
| Available | Tasks | Minutes each | Expected result |
|---|---|---|---|
| 90 | 6 | 12 | 72 required; 18 remain |
| 90 | 10 | 12 | 120 required; deficit 30 |
| 10.5 | 3 | 2.25 | 6.75 required; 3.75 remain |
| 90 | 0 | 12 | 0 required; 90 remain |
These are the cases checked on the actual saved output in the recorded lesson. A decorative Calculate button would fail even if the screenshot reproduction looked convincing. Edit values and submit with the keyboard as well as the mouse; the result should follow the current inputs.
Reject inputs that have no valid answer
Clear each field in turn. A blank must produce a visible error instead of becoming zero through JavaScript numeric conversion. Try zero task duration, a negative available time, a negative task count and a fractional count such as 1.5. Each must be rejected. Decimal minute amounts such as 2.25 remain valid.
The reviewed page uses numeric controls plus explicit JavaScript validation. Native numeric fields have their own constraints, including step behavior; see MDN’s number-input reference. Do not rely on the input’s appearance to establish that all values are acceptable. The recorded implementation also checks finite values and refuses calculations that overflow.
Test layout and accessibility separately
At a narrow phone-width viewport, check that the labels, input controls, error and result remain readable. The whole page should not require sideways scrolling. Tab through the controls, activate submission with the keyboard and verify that a validation error points you back toward the field needing correction. Repeat after changing the values; a screenshot of the starting state does not prove interaction works.
The recorded browser checks observed the expected arithmetic, invalid-input refusal, keyboard submission and a layout without page overflow. They also observed no external requests during those checks. This is a small local demonstration rather than a complete accessibility certification or a hosted application.
Keep the source screenshot, prompt and final file together so later changes have a clear starting point. If your next tool accepts imported records, the contact-cleanup tutorial shows another way to preserve inputs and verify results. Browse the Tutorials hub for more practical workflows.
James Kennedy is a writer and product researcher at Drives Hero with a background in IT administration and consulting. He has hands-on experience with storage, networking, and system performance, and regularly improves and optimizes his home networking setup.


