-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
45 lines (41 loc) · 1.46 KB
/
index.html
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
36
37
38
39
40
41
42
43
44
45
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="styles.css">
<title>Tip Calculator</title>
</head>
<body>
<div class="calculator-container">
<div class="title">
<h1>Tip Calculator</h1>
</div>
<form class="data-for-calculator">
<input id="amountBill" type="number" name="bill-amount" placeholder="Amount of bill">
<input id="percentageTip" type="number" name="tip-percentage" placeholder="Percentage to tip">
<input id="peopleNumber" type="number" name="people-number" placeholder="Number of people">
</form>
<div class="button-flex">
<input type="button" id="reset-button" value="Reset">
<input onclick="calculateTip()" type="button" id="calculate-button" value="Calculate">
</div>
<div class="calculate-result">
<div class="result">
<p>Tips:</p>
<p id="tipAmount"></p>
</div>
<div class="result">
<p>Total to pay:</p>
<p id="totalPay"></p>
</div>
<div class="result">
<p>Total per person:</p>
<p id="perPerson"></p>
</div>
</div>
</div>
<script src="index.js"></script>
</body>
</html>