Here's an example of HTML code for a basic calculator website:

 <!DOCTYPE html>

<html>

  <head>

    <title>Calculator</title>

    <style>

      .calculator {

        width: 400px;

        height: 500px;

        margin: 0 auto;

        background-color: #eee;

        padding: 20px;

      }

      .output {

        height: 50px;

        background-color: white;

        font-size: 36px;

        text-align: right;

        padding-right: 20px;

        margin-bottom: 20px;

      }

      button {

        width: 70px;

        height: 70px;

        margin-right: 10px;

        margin-bottom: 10px;

        font-size: 24px;

      }

    </style>

  </head>

  <body>

    <div class="calculator">

      <div class="output">0</div>

      <button>1</button>

      <button>2</button>

      <button>3</button>

      <button>+</button>

      <br>

      <button>4</button>

      <button>5</button>

      <button>6</button>

      <button>-</button>

      <br>

      <button>7</button>

      <button>8</button>

      <button>9</button>

      <button>x</button>

      <br>

      <button>C</button>

      <button>0</button>

      <button>=</button>

      <button>/</button>

    </div>

  </body>

</html>

Note: This is just a basic example and does not include any functionalities of a calculator. JavaScript code would be needed to add the calculations and other interactive elements.

No comments:

Post a Comment