Saturday

July 27th , 2024

FOLLOW US
pc

Nsiah Obed

5 months ago

USE MY FREE HTML TO CREATE YOUR CALCULATOR

featured img

Read more


xxxxxxxxxxxxxxxx


<!DOCTYPE html>

<html>

<head>

    <title>Calculator</title>

    <style>

        body {

            font-family: Arial, sans-serif;

            text-align: center;

        }

        

        .container {

            width: 400px;

            margin: 0 auto;

            padding: 20px;

            border: 1px solid #ccc;

            border-radius: 5px;

            background-color: #f4f4f4;

        }

        

        input[type="number"] {

            width: 100%;

            padding: 10px;

            margin-bottom: 10px;

            box-sizing: border-box;

        }

        

        .btn {

            width: 50%;

            padding: 12px;

            margin: 5px;

            font-size: 16px;

            font-weight: bold;

            text-align: center;

            border: none;

            border-radius: 5px;

            cursor: pointer;

        }

        

        .btn:hover {

            background-color: #ddd;

        }

        

        .result {

            font-size: 20px;

            font-weight: bold;

            margin: 10px 0;

        }

    </style>

</head>

<body>

    <div class="container">

        <h1>Obed</h1>

        <input type="number" id="num1" placeholder="Enter number 1">

        <input type="number" id="num2" placeholder="Enter number 2">

        <div class="result" id="result">Result: </div>

        <button class="btn" onclick="add()">Add</button>

        <button class="btn" onclick="subtract()">Subtract</button>

        <button class="btn" onclick="multiply()">Multiply</button>

        <button class="btn" onclick="divide()">Divide</button>

    </div>


    <script>

        function add() {

            var num1 = parseInt(document.getElementById('num1').value);

            var num2 = parseInt(document.getElementById('num2').value);

            document.getElementById('result').innerText = 'Result: ' + (num1 + num2);

        }

        

        function subtract() {

            var num1 = parseInt(document.getElementById('num1').value);

            var num2 = parseInt(document.getElementById('num2').value);

            document.getElementById('result').innerText = 'Result: ' + (num1 - num2);

        }

        

        function multiply() {

            var num1 = parseInt(document.getElementById('num1').value);

            var num2 = parseInt(document.getElementById('num2').value);

            document.getElementById('result').innerText = 'Result: ' + (num1 * num2);

        }

        

        function divide() {

            var num1 = parseInt(document.getElementById('num1').value);

            var num2 = parseInt(document.getElementById('num2').value);

            document.getElementById('result').innerText = 'Result: ' + (num1 / num2);

        }

    </script>

</body>

</html>

``

  <!-- Form fields here -->


  <title>Obed</title>

  <style>

    body {

      background-color:indigo;

    }

    form {

      padding: 20px;

      background-color: white;

      width: 300px;

      margin: 0 auto;

    }

    label {

      display: block;

      margin-top: 10px;

    }

    input[type="text"], textarea {

      width: 100%;

      padding: 5px;

      margin-top: 5px;

    }

    input[type="submit"] {

      background-color: blue;

      color: white;

      padding: 10px;

      border: none;

      cursor: pointer;

      margin-top: 10px;

'''

html

<DOCTYPE HTML

<Html>

<head>

label calculator="Name"<"Name:</label>

<br>

<input type= "<text" id= "Name"

name ="Name" required>


    }

  </style>

 <form>

    <label for="Vape">Vape:</label>

    <input type="text" id="Vape" name="vape" required>

 <form>

    <label for="Account Number">Account Number:</label>

    <input type="text" id="Account Number" name="Account Number" required>

    


    

Meet the Author


PC
Nsiah Obed

Teaching

follow me

INTERSTING TOPICS


Connect and interact with amazing Authors in our twitter community