-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
103 lines (99 loc) · 2.31 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>BMI Master</title>
<style>
* {
padding: 0;
margin: 0;
box-sizing: border-box;
}
body {
font-family: Arial, sans-serif;
padding: 20px;
}
h2 {
text-align: center;
margin-bottom: 20px;
}
form {
max-width: 400px;
margin: 0 auto;
border: 1px solid #ccc;
padding: 20px;
border-radius: 8px;
}
label {
display: block;
margin-bottom: 10px;
}
input {
width: 100%;
padding: 8px;
margin-bottom: 15px;
border: 1px solid #ccc;
border-radius: 4px;
}
button {
width: 100%;
padding: 10px;
background-color: #4caf50;
color: white;
border: none;
border-radius: 4px;
cursor: pointer;
}
button:hover {
background-color: #45a049;
}
.result {
margin-top: 20px;
text-align: center;
}
.guide {
margin-top: 30px;
border-top: 1px solid #ccc;
padding-top: 20px;
}
.guide h4 {
margin-bottom: 10px;
}
.guide ul {
list-style-type: none;
padding: 0;
}
.guide li {
margin-bottom: 5px;
}
.guide p {
margin: 0;
}
</style>
</head>
<body>
<h2>BMI Master</h2>
<form id="bmiForm">
<label for="height">Height (cm)</label>
<input type="number" step="0.01" name="height" id="height" />
<label for="weight">Weight (kg)</label>
<input type="number" step="0.1" name="weight" id="weight" />
<button type="submit">Calculate BMI</button>
</form>
<div class="result" id="result">
<br />
<span id="interpretation"></span>
</div>
<div class="guide">
<h4>Guide</h4>
<ul>
<li><strong>Underweight:</strong> BMI less than 18.5</li>
<li><strong>Normal weight:</strong> BMI 18.5 - 24.9</li>
<li><strong>Overweight:</strong> BMI 25 - 29.9</li>
<li><strong>Obese:</strong> BMI 30 or greater</li>
</ul>
</div>
<script src="script.js"></script>
</body>
</html>