For websites

Put “Your next election” on your site

A small box for your website. Someone types their postcode and sees the elections coming up where they live, with the date and how many days are left.

It is free, and it is for anyone: local news sites, schools, charities, councils and community groups.

What it looks like

This is the real box. Try a postcode.

Add it to your site

Copy this into your page where you want the box to appear.

<iframe src="https://whatsittome.org/embed/next-election" title="Your next election" width="100%" height="360" style="border:0" loading="lazy"></iframe>
A version that fits its height to the results

The box above has a fixed height of 360 pixels, so a long list of elections scrolls inside it. This version adds a short script that lets the box grow to fit. It only reads the box’s height, nothing else.

<iframe id="wim-next-election" src="https://whatsittome.org/embed/next-election" title="Your next election" width="100%" height="360" style="border:0" loading="lazy"></iframe>
<script>addEventListener("message",function(e){var f=document.getElementById("wim-next-election");if(e.origin==="https://whatsittome.org"&&f&&e.source===f.contentWindow&&e.data&&e.data.whatsittome==="next-election"&&typeof e.data.height==="number")f.style.height=Math.min(Math.max(e.data.height,200),1600)+"px"});</script>

It works from 300 pixels wide and follows the reader’s light or dark setting. Each election links to its full page on whatsittome.org, which opens in a new tab.

What happens to the postcode

More in how we use data.

What it does not do

It never ranks, scores or recommends a candidate or party. It shows only which elections are coming up and when. If no election is scheduled for a postcode yet, it says so.

Where the data comes from

Election names, places and dates come from Democracy Club, under the Creative Commons Attribution licence (CC BY 4.0). The credit is built into the box, so please leave it in.

Questions or problems: hello@whatsittome.org.