BMI Calculator
About this app
Calculate your Body Mass Index (BMI)
BMI Calculator What is your Body Mass Index (BMI)? Underweight Normal Weight Overweight Obese Calculate Again Note: BMI is a useful measure for adults. It may not be accurate for athletes, elderly, or children.
Related apps
Put this on your site
Source
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>BMI Calculator</title>
<meta name="description" content="Calculate your Body Mass Index (BMI)">
<meta name="keywords" content="BMI, Body Mass Index, Calculator">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<script type="text/javascript">
try {
// App Javascript Goes Here. Place your entire script content inside the try block for error handling.
// This will run when the DOM is ready.
document.addEventListener("DOMContentLoaded", function() {
});
} catch (error) {
// This will throw the error to the parent window.
throw error;
}
</script>
<style>
/* App CSS Goes Here */
.vertical-scale {
display: flex;
flex-direction: column;
justify-content: space-between;
height: 400px;
margin-bottom: 20px;
}
.scale-section {
flex: 1;
background-color: #f8f9fa;
position: relative;
}
.scale-section::before {
content: "";
position: absolute;
top: 0;
bottom: 0;
left: 0;
width: 10px;
background-color: #f8f9fa;
border-right: 2px solid #dee2e6;
}
.scale-section.light-blue {
background-color: #b3d4fc;
}
.scale-section.green {
background-color: #a4e7a5;
}
.scale-section.yellow {
background-color: #ffe066;
}
.scale-section.red {
background-color: #ff6b6b;
}
.legend-container {
display: flex;
justify-content: center;
align-items: center;
margin-top: 20px;
}
.legend {
display: flex;
align-items: center;
margin-right: 20px;
}
.legend-color {
width: 20px;
height: 20px;
margin-right: 10px;
}
.legend-label {
font-weight: bold;
}
.calculate-again-button {
margin-top: 20px;
}
.note {
margin-top: 20px;
text-align: center;
font-style: italic;
}
</style>
</head>
<body>
<div id="main-container" class="container">
<h1>What is your Body Mass Index (BMI)?</h1>
<div class="vertical-scale">
<div class="scale-section light-blue"></div>
<div class="scale-section green"></div>
<div class="scale-section yellow"></div>
<div class="scale-section red"></div>
</div>
<div class="legend-container">
<div class="legend">
<div class="legend-color" style="background-color: #b3d4fc;"></div>
<div class="legend-label">Underweight</div>
</div>
<div class="legend">
<div class="legend-color" style="background-color: #a4e7a5;"></div>
<div class="legend-label">Normal Weight</div>
</div>
<div class="legend">
<div class="legend-color" style="background-color: #ffe066;"></div>
<div class="legend-label">Overweight</div>
</div>
<div class="legend">
<div class="legend-color" style="background-color: #ff6b6b;"></div>
<div class="legend-label">Obese</div>
</div>
</div>
<button class="calculate-again-button btn btn-primary">Calculate Again</button>
<p class="note">Note: BMI is a useful measure for adults. It may not be accurate for athletes, elderly, or children.</p>
</div>
<script type="text/javascript">
try {
// App Javascript Goes Here. Place your entire script content inside the try block for error handling.
// This will run when the DOM is ready.
document.addEventListener("DOMContentLoaded", function() {
// Reset the calculator and begin anew
$(".calculate-again-button").click(function() {
// Reload the page to start the calculator from the beginning
location.reload();
});
});
} catch (error) {
// This will throw the error to the parent window.
throw error;
}
</script>
</body>
</html>
NEW APPS
These are apps made by the community!