Right now, millions of people are online. Reading, scrolling, shopping, watching. And almost none of them have any idea that anyone else is there with them.
That’s not a glitch. It’s a design choice. The modern web was built around you, your feed, your history, your recommendations. Personalisation at scale. And somewhere in that optimisation, the sense of being in a place with other people quietly disappeared.
Spencer Chang noticed this paradox and decided to do something small, precise, and surprisingly radical about it.
What Is PlayHTML?
PlayHTML is an open-source JavaScript library that makes any HTML element collaborative, persistent, and real-time, using nothing more than a single data attribute. No backend to configure. No database to maintain. No framework required.
The idea is almost absurdly simple: add a can-toggle to an image, and it becomes a shared light switch that anyone visiting the page can flip, and everyone sees the same state. Add can-move to an element, and visitors can drag it around, with its position persisting for future visitors. The web element doesn’t just respond to you. It responds to everyone.
Created by artist and engineer Spencer Chang and first introduced in 2023, PlayHTML grew from a personal project into something used by tens of thousands of people across hundreds of websites. By 2025, it had a full docs site, React support, and a Claude plugin, and its philosophy had started appearing in conferences and workshops worldwide.
“Why does the internet feel lonely when so much humanity is woven through it? Because most of the internet is a solitary experience, by design.” — Spencer Chang
How PlayHTML Actually Works

One Attribute, Shared State
The entire interface is built around can-* attributes, declarative HTML tags that describe what an element should do. Some built-in examples:
- can-toggle: click to switch between states (on/off, open/closed)
- can-move: drag the element; position is shared and persists
- can-grow: click to incrementally change size
- can-draw: paint directly on an element, visible to all visitors
Add one of these to any HTML tag, import the PlayHTML script, and the element becomes a live and shared object, syncing state to everyone on that page simultaneously.
The Infrastructure Behind It
Under the hood, PlayHTML uses PartyKit, a real-time infrastructure platform, to handle state synchronisation and persistence. Chang runs this server himself, and by default, anyone using PlayHTML’s hosted version simply routes through it.
It’s worth noting: data is not encrypted, and anyone with the room name can access it. For most PlayHTML use cases, a toggleable lamp, a communal guestbook, and shared sticky notes are fine. For sensitive applications, the library supports self-hosted backends, letting developers plug in their own storage.
Four Types of State
PlayHTML distinguishes between four interaction layers, each serving different needs:
- Element data: state tied to a specific element (a lamp being on or off)
- Page data: state shared across the whole page
- Presence: who else is here right now, live cursors, visitor counts
- Events: transient interactions like notifications or pulses
Together, these four primitives cover most of what you’d want from a communal web experience, without writing a single line of backend code.
Who’s Using It and How
Personal Sites That Feel Like Spaces
The most natural home for PlayHTML has been the indie web, personal websites built by designers, artists, and developers who care about the texture of the internet. A lamp on someone’s homepage that visitors can turn on and off together. A guestbook where messages from past visitors linger. A shared canvas where anyone can leave a mark.
These aren’t features. They’re gestures toward presence. The subtle signal that someone else was here, and that what they did mattered enough to persist.
Multiplayer Web Games
Chang’s own project, “Fridge Poetry”, a multiplayer word game built with PlayHTML, became one of its most-cited examples. Visitors can drag magnetic words around a communal fridge door, leave poems for strangers, and watch others rearrange them in real time. It was covered by Yahoo and Rock Paper Shotgun, which described it as a game that turns the web into a shared living room.
Workshops and Education
At Grey Area’s Neighbourhood Internets workshop (August 2024), participants built ~30 websites and communal games using PlayHTML in a single session. The premise: if making collaborative web elements is as easy as making single-player ones, what does that unlock for people who just know basic HTML and CSS?
Coming up in June 2026, Chang is scheduled to present “Building Benches for the Web” at SFPConline, a talk about designing web infrastructure that invites people to stay, gather, and participate rather than just consume.
The Web Doesn’t Have to Be a Broadcast Medium
The loneliness of the modern web isn’t inevitable. It’s a consequence of design decisions made at scale, for scale such as algorithmic feeds, personalised content and engagement metrics that treat users as individuals, never as a crowd.
PlayHTML works at the opposite end of that logic. It’s small, intentional, and built around the idea that infrastructure shapes behaviour. Give people a shared light switch on a webpage, and they’ll start to wonder who else is there. Give them a communal drawing surface, and strangers will leave messages for each other without being asked.
This is a quiet counter-movement to the attention economy. Not a startup. Not a platform. Just an open-source library that asks: what if the default state of the web was communal?
The modern web is optimised for you. PlayHTML optimises for us.
The approach has limitations. PlayHTML scales elegantly for small, intimate web experiences, but wasn’t designed for millions of concurrent users. It’s not trying to replace Figma or Notion. It’s carving out something smaller and, in some ways, more interesting, an expressive infrastructure for the human-scale web.

Key Takeaways
- Created by Spencer Chang, artist and engineer, launched in 2023, and actively maintained through 2026.
- Core idea: Add a single HTML attribute (e.g., can-toggle, can-move) to make any web element real-time and collaborative.
- No backend required: Real-time sync and persistence handled via PartyKit; self-hosted backends available for custom needs.
- Library-agnostic: Works with plain HTML or React. Importable via CDN in one script tag.
- Four state layers: Element data, page data, presence (live cursors), and events.
- Scale: Used by tens of thousands of people across hundreds of sites, from personal homepages to multiplayer games.
- Philosophy: Building infrastructure for a communal, lived-in web rather than the personalized, solitary default.
What If the Web Knew You Were There?
Most of us have forgotten that the early web had a kind of presence to it. Visitor counters. Guestbooks. Hit maps. Crude, yes, but they communicated something real: other people are here too.
PlayHTML doesn’t want to resurrect the 90s web. It wants to ask a more interesting question: what would a genuinely communal web look like, built with the tools we have now? What if presence wasn’t a premium feature you paid for, but a default one you turned on with an attribute?
The library is small. The idea behind it isn’t.
The web was always capable of this. Someone just had to remember to build for everyone at once.
