Lab 6.2 HTML

mail@pastecode.io avatarunknown
html
a month ago
1.6 kB
2
Indexable
Never
Lab 6.2
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>BMI</title>
    </head>
    <style>
        table {
            border-collapse: collapse;
            border: 1px solid black;
        }

        th, td {
            border: 1px solid black;
            padding: 8px;
            text-align: center;
        }
    </style>
    <script src = "2.js"></script>
    <body>
        <h1>BMI Calculator</h1>
        <br>
        <form>
            <label for="w">Weight(Kg)</label>
            <input type="text" name="w" id="w">
            <br>
            <label for="h">Height(Cm)</label>
            <input type="text" name="h" id="h">
        </form>
        <button onclick="check()">Calculate</button>
        <br>
        <h2>BMI Result</h2>
        <p id="output">No Result</p>
        <br>
        <h2>BMI References</h2>
        <table>
            <thead>
                <th>BMI</th>
                <th>Classification</th>
            </thead>
            <tbody>
                <tr>
                    <td>Less than 18.5</td>
                    <td>Underweight</td>
                </tr>
                <tr>
                    <td>18.5 - 24.9</td>
                    <td>Normal Weight</td>
                </tr>
                <tr>
                    <td>25.0 - 29.9</td>
                    <td>Overweight</td>
                </tr>
                <tr>
                    <td>30.0 or more</td>
                    <td>Obese</td>
                </tr>
            </tbody>
        </table>
    </body>
</html>