-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
53 lines (50 loc) · 1.43 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
46
47
48
49
50
51
52
53
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>BMI Calculator</title>
<link rel="stylesheet" href="./css.css" />
<script src="./script.js" defer></script>
</head>
<body>
<div class="container">
<h1>BMI Calculator</h1>
<form onsubmit="return false">
<div class="input">
<label for="height">Height (in cm)</label>
<input type="number" id="height" placeholder="e.g. 185" />
</div>
<div class="input">
<label for="weight">Weight (in kg)</label>
<input type="number" id="weight" placeholder="e.g. 65" />
</div>
<button type="submit" id="calc">Calculate</button>
</form>
<p id="result">Result pending...</p>
<table>
<tr>
<th>Weight Status Category</th>
<th>BMI Range (kg/m2)</th>
</tr>
<tr>
<td>Underweight</td>
<td>Below 18.5</td>
</tr>
<tr>
<td>Healty weight</td>
<td>18.5 to 24.9</td>
</tr>
<tr>
<td>Overweight</td>
<td>25 to 29.9</td>
</tr>
<tr>
<td>Obese</td>
<td>30 or greater</td>
</tr>
</table>
</div>
</body>
</html>