how to make a calculator website html

Solutions on MaxInterview for how to make a calculator website html by the best coders in the world

showing results for - "how to make a calculator website html"
Fynn
31 Jul 2018
1<!DOCTYPE html>
2<html lang="en">
3  <head>
4    <meta charset="UTF-8" />
5    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6    <title>Calculator </title>
7  </head>
8
9  <!--CSS File-->
10
11  	* {
12  margin: 0;
13  padding: 0;
14  box-sizing: border-box;
15}
16body {
17  display: flex;
18  justify-content: center;
19  align-items: center;
20  min-height: 100vh;
21  background: #fffbd5; /* fallback for old browsers */
22  background: -webkit-linear-gradient(
23    to right,
24    #b20a2c,
25    #fffbd5
26  ); /* Chrome 10-25, Safari 5.1-6 */
27  background: linear-gradient(
28    to right,
29    #b20a2c,
30    #fffbd5
31  ); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
32}
33.container-first {
34  position: relative;
35  background: #0b8000;
36  border-radius: 6px;
37  overflow: hidden;
38  z-index: 10;
39}
40.container-first .calculator {
41  position: relative;
42  display: grid;
43}
44.container-first .calculator .value {
45  grid-column: span 4;
46  height: 140px;
47  width: 300px;
48
49  border: none;
50  padding-left: 1em;
51
52  font-size: 2.5em;
53
54  color: gold;
55}
56.container-first .calculator span {
57  display: grid;
58  height: 4.5em;
59  font-weight: 900;
60  color: rgb(255, 255, 255);
61  text-align: center;
62  align-items: center;
63
64  font-size: 20px;
65  user-select: none;
66  border-bottom: 4px solid rgba(255, 255, 255, 0.07);
67  border-right: 4px solid rgba(255, 255, 255, 0.07);
68}
69input[type="text"] {
70  color: rgb(255, 136, 0);
71  background-color: rgb(156, 40, 40);
72}
73  <body>
74    <div class="container-first">
75      <form name="val" class="calculator">
76        <input type="text" class="value" name="ans" />
77        <span onclick="document.val.ans.value+='4'">4</span>
78        <span onclick="document.val.ans.value+='5'">5</span>
79        <span onclick="document.val.ans.value+='6'">6</span>
80
81
82        <span onclick="document.val.ans.value =eval(document.val.ans.value)">
83          =
84        </span>
85
86
87        <span onclick="document.val.ans.value+='7'">7</span>
88        <span onclick="document.val.ans.value+='8'">8</span>
89        <span onclick="document.val.ans.value+='9'">9</span>
90        <span onclick="document.val.ans.value+='-'">-</span>
91
92        <span onclick="document.val.ans.value+='1'">1</span>
93        <span onclick="document.val.ans.value+='2'">2</span>
94        <span onclick="document.val.ans.value+='3'">3</span>
95
96        <span onclick="document.val.ans.value+='/'">/</span>
97
98        <span onclick="document.val.ans.value+='0'">0</span>
99        <span onclick="document.val.ans.value=''">C</span>
100        <span onclick="document.val.ans.value+='*'">*</span>
101
102        <span onclick="document.val.ans.value+='00'">00</span>
103
104        <span onclick="document.val.ans.value+='+'">+</span>
105      </form>
106    </div>
107  </body>
108</html>
Elyas
24 Nov 2017
1
2<!DOCTYPE html>
3<html lang="en">
4<head>
5<style>
6.contain{
7display: flex;
8}
9#display{
10  width: 98%;
11  
12}
13.mathButtons{
14  width: 100px;
15  height: 40px;
16  background-color: rgb(0,0,0,0.3);
17  color: white;
18}
19.mathButtons:hover{
20  background-color: DodgerBlue;
21  
22  }
23  #clearButton:hover{
24    background-color: orangered;
25  }
26  #container{
27  
28    width: 430px;
29    height: 300px;
30
31    }
32    
33    
34    .buttondigits{
35      background-color:  black;
36      color: white;
37      height: 40px;
38      width: 100px;
39    }
40    #clearButton{
41      width: 100px;
42      height: 40px;
43      background-color: rgb(0,0,0,0.3);
44      font-weight: bold;
45    }
46	.buttondigits:hover {
47background-color: gray;
48}
49
50</style>
51<title> standard calculator </title>
52<meta charset="utf-8">
53<link rel="stylesheet" href="cal.css"/>
54</head>
55<body>
56  
57     <div class="container">
58	<fieldset id="container">
59	  <form name="calculator">
60<input type="text" id="display" name="display" readonly>
61<br>
62<br>
63<br>
64<div class="contain">
65<input class="buttondigits" type="button" value="7" onclick="calculator.display.value += '7'">
66<input class="buttondigits" type="button" value="8" onclick="calculator.display.value += '8'">
67<input class="buttondigits" type="button" value="9" onclick="calculator.display.value += '9'">
68<input class="mathButtons" type="button" value="+" onclick="calculator.display.value += '+'">
69</div>
70
71<div class="contain">
72<input class="buttondigits" type="button" value="4" onclick="calculator.display.value += '4'">
73<input class="buttondigits" type="button" value="5" onclick="calculator.display.value += '5'">
74<input class="buttondigits" type="button" value="6" onclick="calculator.display.value += '6'">
75<input class="mathButtons" type="button" value="-" onclick="calculator.display.value += '-'">
76</div>
77
78<div class="contain">
79<input class="buttondigits" type="button" value="1" onclick="calculator.display.value += '1'">
80<input class="buttondigits" type="button" value="2" onclick="calculator.display.value += '2'">
81<input class="buttondigits" type="button" value="3" onclick="calculator.display.value += '3'">
82<input class="mathButtons" type="button" value="*" onclick="calculator.display.value += '*'">
83</div>
84
85<div class="contain">
86<input id="clearButton" class="button" type="button" value="C" onclick="calculator.display.value = ''">
87<input class="buttondigits" type="button" value="0" onclick="calculator.display.value += '0'">
88<input class= "mathButtons" type="button" value="=" onclick="calculator.display.value = eval(calculator.display.value)">
89<input class="mathButtons" type="button" value="/" onclick="calculator.display.value += '/'">
90</div>
91</form> 
92</fieldset>
93</div>
94</body>
95</html>
Yohann
28 Sep 2019
1<body>
2  
3   <center>
4    <h1 class="text-danger">Calculator</h1> 
5    <p class="q">Type in the numbers to be added, separate them with commas (,). If 'Invalid' shows, you have not used a number, please clear the box and type numbers</p>
6   </center>
7
8    <center>
9    <h3 style="font-family: Lucida Sans; color: lightseagreen">Add</h3>
10    <input class="addinput" type="text">
11   <button class="add" style="font-family: Lucida Sans; background-color: lightsalmon">ADD</button>
12   <p class="p" style="background-color:lightpink">Sum is <span class="result"></span></p>
13   </center>
14 
15<center>
16    <h3 style="font-family: Lucida Sans; color: lightseagreen">Multiply</h3>
17  <input class="multiplyinput" type="text">
18  <button class="multiply" style="font-family: Lucida Sans; background-color: lightsalmon">MULTIPLY</button>
19   <p class="p" style="background-color:lightpink"></p>>Product is <span class="product"></span></p>
20</center>
21
22<center>
23        <h3 style="font-family: Lucida Sans; color: lightseagreen">Subtract</h3>
24    <input class="subtractinput" type="text">
25    <button class="subtract" style="font-family: Lucida Sans; background-color: lightsalmon">SUBTRACT</button>
26     <p class="p" style="background-color:lightpink"></p>>Difference is <span class="difference"></span></p>
27  </center>
28
29  <center>
30        <h3 style="font-family: Lucida Sans; color: lightseagreen">Divide</h3>
31    <input class="divideinput" type="text">
32    <button class="divide" style="font-family: Lucida Sans; background-color: lightsalmon">DIVIDE</button>
33     <p class="p" style="background-color:lightpink"></p>>Quotient is <span class="quotient"></span></p>
34  </center>
35  
36   <script src="calculator.js"></script>
37
38</body>
queries leading to this page
build a calculator using htmlhtml code for calculatormakeing calculation in htmlhow to make calculator in htmlsimple html calculatorcalculator htmldisplaying what we typed while making calculator in htmlhtml code to create calculatorhtml calculatorhow to make calculator in javascript easyget calculator to display input in javascripthtml code to make a simple calculator how to make a calculator website htmlcalculator codingbuild a simple calculator using html5calculator w3schoolshtml code calculatorcalculator using javascript and htmlcalculator button javascriptcreate calculator in htmlbuild a calculator on htmlhow to create without calculator html and css websitesimple calculator in htlhow to make a calculator in htmlcalculator in htmlhow to make a calculator htmlcreating calculator with just html csssimple calculator html codew3schools calculator htmlcalculator using html csssimple calculator wid 2 fields using html and javascripthow to make a calculator in html with javascript with writing in boxhow to make calculator in html and cssthings to put on calcualtor htmlsimple calculator in htmlhtml program for simple calculatorcalculator source code htmlcalculator code in htmlhow to make a calculator by htmlcalculator html cssbuilding a calculator with input field javascripthtml css javascript calculator codesimple calculator design in htmlcalculator code html csscoding the result of calculator in htmlcalculator htmlhtml calculator no stylehtml code for a calculatorhtml calculator examplecalculator with html and csscreate a simple calculator using html and cssmaking a calculator in htmlhow to design a simple calculator web applicationcreate a calculator htmlhow to make a calculatgor using htmlcalculatrice htmlmake html calculator that does not enter alhabethow to make a calculator using htmlsource code html calculatorcalculator in js and htmlcalculator using htmlhtml javascript calculation pagehtml code for simple calculatorhtml calculatorhtml calculator designhtml how to make basic calculatorhtml code for basic calculatorcalculator with stepshow to make a calculator in webbroswercalculator html code freesimple calculator html csshow to build calculator html csshow to create calculator in html w3schoolshow to make html button do calculationhow to make calculator in javascript with htmlcalculator source code in htmlcalculator symbol html codehow to add make a calculator in htmlsimple calculator javascript the user enters an arithmetic expression and click button to perform the required computationshow to code a calculator in htmlhow to make a calculator using html and javascripthow to create a calculator htmlhtml input small text for calculatorw3schools html calculatorbasic calculator htmlsimple calculator htmlcalculator w3schoolsimple calculator in javascriptonline calculator html codecode for making calculator in htmlcalculator css htmlcalculator html css codecalculator html css w3schoolscalculator using javascript code html and cssmake calculator screen with htmlhow to make a simple calculator with html cass and jshtml code for calculator design html code to make a simple calculator for beginnershow to create a calculatror htmlreate a simple calculator javascript program the user enters an arithmetic expression and clicks a button to perform the required computations the answer is displayed in the regular running text of the page how to create a calculator in htmlsimple calculator using html 2c csssimple calcultor in htmlcalculator using html and cssjavascript calculator simple codew3schools calculatorhtml calculator interfacehtml code to make a calculatoprdata calculator javascriptcalculator html codemake a basic html we using calculatormake a simple calculator in htmlcalculator web page in htmlconvert what to what calculatorbuild a simple calculator using html5 w3schoolssimple calculator html 5how to make a simple calculator using html and javascriptbuild a calculator with htmlhow to make a calcualtor in htmljavascript calculator using html formhow to make a calculator in html and csscalculator html code w3schoolssimple calculator in html5creating calculator with htmlcalculator codes in htmlperform calculation using in htmlmake calculator htmlbasic calculator w3schoolsprogramming calculator in html codemaking a calculator using htmlcalculator design in htmlhtml calculator program making a calculator in csshow to make a calculator on your website with html and csscalculation of screen calculation in htmlsimple calculator program in htmlhtml code a simple calculatorhtml calculator demohow to create a display on calculator using htmlcalculate htmlrechner html code basicmake a calculator in htmlhow to create a html calculatorjavascript calculator codebuilding a calculator in htmlmaking calculator in htmlhtml simple calculatorprogramming calculator htmlhow to build calculator in htmlmake calculator with htmlcalculator ui htmlhtml calculator codedesigning of calculator using html and csssimple calculator in html codecreate a simple calculator using htmlsimple attractive basic calculator php css using html code basic calculator using javascripthtml code to make a calculatorhow to create a simple calculator in htmlcalculator in html w3schoolshow to make a calculator website html