An online scoreboard is a browser-based, two-team score display that accepts only four discrete adjustments—−1, +1, +2, and +3—and keeps every score inside a strict numeric window between 0 and 9,999,999. It does not understand any particular sport; it is a generic state machine that reads team labels, applies allowed deltas, and renders the two current totals in a high-contrast, tabular display. Because state is held only in the active tab, nothing about team names or scores leaves the device, and reloading the page returns both scores to zero. The tool exists to give a room a single, unambiguous source of truth for a casual game, classroom quiz, tabletop event, or practice drill, without accounts, network syncing, or backend storage. Each control follows an explicit rule—subtraction floors at zero, addition stops before the cap, and full reset requires a two-step confirmation—so the displayed numbers always match a verifiable transition from the previous state.

Scope of an Online Scoreboard
An online scoreboard, in the simplest sense, is a digital score-keeping surface that runs entirely inside a single browser tab. The version explained here is intentionally narrow: it shows two columns, one for Team A and one for Team B, plus a small set of controls that change the integers displayed under each label. There is no timeline, no player roster, no period counter, and no clock. Anything beyond integer scoring belongs to a different tool.
It is helpful to call out what the scoreboard does not do, because the term "scoreboard" gets reused for very different products:
- It does not implement rules for basketball, tennis, cricket, volleyball, table tennis, or any named sport.
- It does not know about goals, sets, innings, fouls, possession, serving order, deuce, or tie-breaks.
- It does not track winning conditions, so it will not declare a winner or announce a tie.
- It does not write to localStorage, sync between devices, or send scores to a server.
- It does not provide referee lock, audit trail, undo history, or tamper evidence.
That scope is a feature, not a limitation, when the goal is a transparent local tally that anyone in the room can read at a glance.
The Allowed Score Increments
The score logic is the heart of any scoreboard, and the rules here are unusually strict. Only four deltas are ever accepted: subtract one, add one, add two, and add three. Anything else—five points at once, ten points, a half-point, a custom value—is simply rejected by the underlying state layer. That is why the controls are labeled −1, +1, +2, and +3 rather than a free-form input field.
| Button | Effect on the selected team | When it is rejected |
|---|---|---|
| −1 | Decreases the team score by 1 | Already disabled while the score is 0; subtraction cannot produce a negative value |
| +1 | Increases the team score by 1 | Rejected if the result would exceed 9,999,999 |
| +2 | Increases the team score by 2 | Rejected if the result would exceed 9,999,999 |
| +3 | Increases the team score by 3 | Rejected if the result would exceed 9,999,999 |
The +2 and +3 buttons are conveniences for activities that award points in those sizes; they are not a claim that any specific sport uses them. If the event only awards one point at a time, simply ignore the larger buttons. Using only the increments that match the event keeps the displayed total meaningful, since the tool never silently coerces an unsupported value into the next legal one.
How to Use the Online Scoreboard
- Open the Online Scoreboard in your browser tab. The two default columns are already labeled Team A and Team B with both scores at zero.
- Click into the Team A name field and type a short label for the first team. Repeat for Team B. Names accept up to 40 ordinary characters; control characters are rejected, and a blank field falls back to the original Team A or Team B label so the buttons stay readable.
- Press +1, +2, or +3 under the appropriate team whenever that team earns points. The score updates immediately in the high-contrast display.
- Press −1 to correct an over-count. The button is automatically disabled when the displayed score is already zero, which prevents accidental negatives.
- Use the per-team reset button to zero a single team's score when needed. The other team's score and both names remain unchanged.
- Press Reset both scores only when the full match or session is finished. The first press changes the label to Confirm reset both scores and shows a clear status message; press it again within that armed state to zero both totals while keeping the team names. Press Cancel to dismiss without changing anything.
- Compare the final display with any independent record before ending the event. Reloading, closing, or navigating away clears the tab, so do not rely on the browser to remember the result.
Reset Behavior: Single-Team vs Full Reset
Reset is where most confusion happens, because the two reset controls behave very differently. Each team has its own immediate reset button that takes effect with a single press and leaves the other score, both team names, and any pending confirmation untouched. That single-team reset is the right choice when one side started early, was scored by mistake, or needs to be wiped between rounds of a tournament-style activity.
The full reset, by contrast, is deliberately two-step. The first press does not zero anything; it only changes the button label to Confirm reset both scores and surfaces a polite live-region status message. A second press inside that armed state performs the actual reset while preserving both team names. Any score change, name edit, or the Cancel control disarms the pending reset, so a confirmation can never linger after the surrounding state has already moved on.
| Action | Team A score | Team B score | Team names | Confirmation needed |
|---|---|---|---|---|
| Reset Team A only | Set to 0 | Unchanged | Preserved | No |
| Reset Team B only | Unchanged | Set to 0 | Preserved | No |
| Reset both scores (first press) | Unchanged | Unchanged | Preserved | Arms a pending confirmation |
| Confirm reset both scores (second press) | Set to 0 | Set to 0 | Preserved | Yes, explicit two-step |
| Cancel | Unchanged | Unchanged | Preserved | Dismisses the pending confirmation |
Bounds, Validation, and Why the Numbers Stop Where They Do
Every score is stored as a non-negative integer that must remain between 0 and 9,999,999 inclusive. The state layer validates that on every action, which is why subtracting at zero is silently floored rather than producing −1, and why an addition that would push the total past the cap is rejected with an overflow notice instead of wrapping. The same validation rejects any non-integer, unsafe, or already-out-of-range value rather than coercing it. That explicit behavior makes the scoreboard verifiable: the displayed number is always reachable from the previous displayed number by one of the four legal operations.
The 9,999,999 ceiling is a software safety limit, not a rule from any league. It exists so the high-contrast display always renders cleanly in a browser tab, so the underlying state cannot be pushed into a string that overflows the layout, and so the validation logic can stay trivially auditable. If an event would actually need scores larger than that, a tournament system with a real database is the right tool—this scoreboard is not.
Privacy and Persistence Model
Everything the scoreboard knows lives in the active browser tab. No team name, score, or button press is uploaded to a server, written to localStorage, or shared through a link. There is no account, no shared room, and no remote device that mirrors the totals. That means a second person looking over your shoulder in the room sees the same numbers, but a second person on a different device sees nothing.
It also means the tab is the source of truth for as long as it stays open. Reloading, closing, or navigating away returns both scores to zero and both names to their defaults. That deliberate non-persistence avoids leaving participant labels on a borrowed device and prevents stale scores from silently reappearing at a later event, but it also rules this tool out as the only record of a result that must survive a browser crash, a dispute, or an official review. For anything beyond a casual tally, record the outcome independently as play proceeds.
Accessibility and Keyboard Behavior
Because the controls are native HTML buttons and text inputs, pressing Tab moves focus through them in the same order they appear visually: team name, score buttons, team reset, and finally the global reset area. Enter or Space activates a focused button according to normal browser behavior, so a scorekeeper can run the entire scoreboard from the keyboard without a mouse.
Every score-change button carries an ARIA label that includes both the operation and the current display name, so a screen reader announces something like "Add one to Team Red" rather than just "Plus one." The score output has a matching accessible label, and status messages—such as the overflow warning or the armed reset confirmation—appear in a polite live region so they are announced without stealing focus. Disabled subtract and single-team reset controls communicate that the displayed score is already zero, which removes the ambiguity of a silently inactive button.