-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
35 lines (30 loc) · 1.14 KB
/
index.html
File metadata and controls
35 lines (30 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Tip Calculator</title>
<link rel="stylesheet" href="css/styles.css">
</head>
<body>
<div class="container">
<h1>Tip Calculator</h1>
<form action="#" id="form-tip">
<label for="bill">Bill Amount</label><br>
<input type="number" id="bill" name="bill" required><span> CHF</span><br>
<p>Tip percentage: </p> <br>
<input type="radio" id="10" name="tip" value="10" required>
<label for="10">10%</label>
<input type="radio" id="15" name="tip" value="15">
<label for="15">15%</label>
<input type="radio" id="20" name="tip" value="20">
<label for="20">20%</label><br>
<button type="submit" id="submit-btn">Submit</button>
</form>
<div class="error" style="color: red;"></div>
<p>Tip amount: <span id="tip-amount"></span></p>
<p>Total amount: <span id="total-amount"></span></p>
</div>
<script src="js/script.js"></script>
</body>
</html>