all templates
Web Basics

Tip Calculator

Your first interactive page: type a bill, see the tip update live.

The gentlest possible start. Three inputs, a little math, and the numbers on screen change as you type. You'll learn the pattern behind almost every web page: read the inputs, calculate, write the answer back.

What's inside

  • Live updates on every keystroke and slider move
  • The read → calculate → render loop, explained in the README
  • Currency formatting with the built-in Intl API
  • Automatic light & dark mode via one CSS block
  • No build step — double-click index.html and it works

Quickstart

$ git clone https://github.com/devai-io/devai_boilerplates.git$ cd devai_boilerplates/tip-calculator$ open index.html   # or just double-click the file

Browse the code

The full source, exactly as it ships in the repo.

loading…
Download .zip
loading tree…

about this tutorial

A devai.io starter tutorial — small, complete, and readable in one sitting. Master this loop and most of the web makes sense.