Advertisement
syssboxx

HTML-Calculator

Aug 2nd, 2013
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 2.31 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Exercise 4 - Calcucator </title>
  5. <style>
  6. table
  7. { background-color:grey;
  8.  font-size:25px;
  9. }
  10. .button
  11. {width:40px;
  12.  height:40px;
  13.  text-align: center;
  14.  font-size:25px;
  15.  }
  16. .button0
  17. {width:85px;
  18.  height:40px;
  19.  text-align: center;
  20.  font-size:25px;
  21. }
  22. .result
  23. {width:170px;
  24.  height:40px;
  25.  text-align:right;
  26.  font-size:25px;
  27. }
  28.  
  29. </style>
  30. </head>
  31.  
  32. <body>
  33. <form name="calculator" action="apply-now.php" method="post">
  34.     <table border="1">
  35.      <tr>
  36.         <td colspan="4"><input type="text" class="result" name="result" value="123"/>
  37.         </td>
  38.      </tr>
  39.      <tr>
  40.         <td>
  41.             <input type="button" class="button" name="button1" value="1"/>
  42.         </td>
  43.         <td>
  44.             <input type="button" class="button" name="button2" value="2"/>
  45.         </td>
  46.         <td>
  47.             <input type="button" class="button" name="button3" value="3"/>
  48.         </td>
  49.         <td>
  50.             <input type="button" class="button" name="buttonPlus" value="+"/>
  51.         </td>
  52.     </tr>
  53.     <tr>
  54.         <td>
  55.             <input type="button" class="button" name="button4" value="4"/>
  56.         </td>
  57.         <td>
  58.             <input type="button" class="button" name="button5" value="5"/>
  59.         </td>
  60.         <td>
  61.             <input type="button" class="button" name="button6" value="6"/>
  62.         </td>
  63.         <td>
  64.             <input type="button" class="button" name="buttonMinus" value="-"/>
  65.         </td>
  66.         </tr>
  67.     <tr>
  68.         <td>
  69.             <input type="button" class="button" name="button7" value="7"/>
  70.         </td>
  71.         <td>
  72.             <input type="button" class="button" name="button8" value="8"/>
  73.         </td>
  74.         <td>
  75.             <input type="button" class="button" name="button9" value="9"/></td>
  76.         <td>
  77.             <input type="button" class="button" name="buttonAddition" value="+"/>
  78.         </td>
  79.     </tr>
  80.     <tr>
  81.         <td colspan="2">
  82.             <input type="button" class="button0" name="button0" value="0"/>
  83.         </td>
  84.         <td>
  85.             <input type="button" class="button" name="buttonPoint" value="."/>
  86.         </td>
  87.         <td>
  88.             <input type="button" class="button" name="buttonDivision" value="/"/>
  89.         </td>
  90.     </tr>
  91.     </table>
  92. </form>
  93. </body>
  94.  
  95. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement