1
Fork 0
tip-calculator/index.html
Leonardo Devai 6a0ad75b97 Add the devai.io boilerplate library: 42 runnable projects
21 bite-sized beginner tutorials (Web Basics, APIs & Data), the 8-backend blog
engine series, 4 blog frontends, 2 React starters, 3 NixOS desktops and 4 Rust
API/pipeline boilerplates. Every folder is a complete, self-contained project
with its own README.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VGNxPf9PrSG2kzrxSvn45Y
2026-07-19 16:31:48 +02:00

45 lines
1.2 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Tip Calculator</title>
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<main class="card">
<h1>Tip Calculator</h1>
<p class="sub">Split a restaurant bill in seconds.</p>
<label for="bill">Bill amount</label>
<input
id="bill"
class="input"
type="number"
inputmode="decimal"
min="0"
step="0.01"
placeholder="e.g. 48.50"
/>
<label for="tip">Tip: <span id="tipLabel">18%</span></label>
<input id="tip" class="range" type="range" min="0" max="30" step="1" value="18" />
<label for="people">Number of people</label>
<input id="people" class="input" type="number" min="1" step="1" value="1" />
<div class="result">
<div class="row">
<span>Tip</span>
<strong id="tipAmount">$0.00</strong>
</div>
<div class="row total">
<span>Total per person</span>
<strong id="perPerson">$0.00</strong>
</div>
</div>
</main>
<script src="app.js"></script>
</body>
</html>