---
title: Full-screen clock
description: Screen-filling clock that keeps the display awake. Tap for seconds, double-tap for full screen.
---

# Full-screen clock

Scales the time and date to fill the screen and asks the browser to keep the display on. Follows the system light/dark setting.

## Use

- Tap once to show or hide seconds (remembered on this device).
- Double-tap to toggle full screen (Fullscreen API). iPhone Safari doesn't offer that API to pages, so on iPhone the double-tap shows a hint instead: Share → Add to Home Screen opens the clock with no browser UI.
- `?24h` forces 24-hour time: `/clock/?24h`
- `?tz=Area/City` shows another time zone: `/clock/?tz=Europe/London`

## How it's built

One HTML file. `Intl.DateTimeFormat` formats the time, and tabular numerals keep each digit the same width so nothing jumps as the time changes. The face is measured at 100px and scaled to fit the viewport, and refits only when the text length or the window size changes. The Screen Wake Lock API keeps the display on (re-requested when the tab becomes visible again). The Fullscreen API handles the double-tap, and `light-dark()` handles the theme.
