Skip to content
HTML Templates For Developers

Documentation

Pollster — Survey Form Template

Version 1.0.0 · Vanilla HTML · 12 files · 75 KB

Back to the template

Getting started

  1. Unzip the download and open index.html in a browser. No server, installation or build step is needed.
  2. Edit the text directly in the HTML files.
  3. Change colours, fonts and spacing through the CSS custom properties at the top of assets/css/style.css.
  4. Replace the artwork in assets/images/ with your own images.
  5. Upload the whole folder to any static host.

File structure

The download contains these 12 files:

  • LICENSE.txt1.7 KB
  • README.md2.5 KB
  • assets/css/style.css13 KB
  • assets/fonts/abril-fatface-LICENSE.txt4.4 KB
  • assets/fonts/abril-fatface-latin-400-normal.woff213 KB
  • assets/fonts/figtree-LICENSE.txt4.4 KB
  • assets/fonts/figtree-latin-wght-italic.woff220 KB
  • assets/fonts/figtree-latin-wght-normal.woff220 KB
  • assets/images/favicon.svg297 B
  • assets/js/main.js16 KB
  • documentation/index.html10 KB
  • index.html4.3 KB

Colours

These custom properties are defined at the top of the stylesheet. Change a value once and it updates everywhere it is used.

  • --color-black#111111
  • --color-ink#1B1B1B
  • --color-yellow#FDE047
  • --color-yellow-deep#EAB308
  • --color-white#FFFFFF
  • --color-grey#BDBDBD
  • --color-line#3A3A3A
  • --color-danger#FF8A80

Interactive features

Questions

Edit the QUESTIONS array at the top of assets/js/main.js. Each item has an id, a type (single, multi, scale, text or rank), a title and its options.

Keyboard shortcuts

onKey() in main.js handles Enter, letter keys and number keys. Shortcuts are ignored while typing in a text field.

Ranking

Give a rank question an options list. Respondents reorder with the arrow buttons and the final order is stored as an array.

Sending answers

Replace the timer in sendAnswers() with a request to your server and call onSuccess() when it resolves. The answers object holds every response.

Customisation notes

Survey title and intro

The headline, lead text and brand live in the intro section of index.html; the survey name in the header is set in updateBar() in main.js.

Accent colour

Change --color-yellow in the :root block. Text on yellow is black, so choose another bright colour for the same contrast.

Optional questions

Set required: false on any question to allow skipping it; skipped questions show as Skipped in the summary.

What is front-end only

This is a front-end template. The behaviours below are demonstrations that run in the browser; connect them to your own server or service before relying on them.

  • The survey collects answers in the browser and shows them back; nothing is sent or stored until you connect a backend.

Bundled components and licences

Everything the template needs is inside the download; nothing is loaded from the network.

  • Abril Fatface typeface — OFL-1.1 (assets/fonts/abril-fatface-LICENSE.txt)
  • Figtree typeface — OFL-1.1 (assets/fonts/figtree-LICENSE.txt)

Changelog

Version 1.0.0 · Nov 23, 2026

  • Initial release.