-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
97 lines (81 loc) · 3.09 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
<!-- <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Calculator</title>
<link href="styles.css" rel="stylesheet">
<script src="script.js" defer></script>
</head>
<body>
<div class="calculator-grid">
<div class="output">
<div class="previous-operand"></div>
<div class="current-operand"></div>
</div>
<button class="span-two">AC</button>
<button>DEL</button>
<button>÷</button>
<button>1</button>
<button>2</button>
<button>3</button>
<button>*</button>
<button>4</button>
<button>5</button>
<button>6</button>
<button>+</button>
<button>7</button>
<button>8</button>
<button>9</button>
<button>-</button>
<button>.</button>
<button>0</button>
<button class="span-two">=</button>
</div>
</body>
</html> -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<title>Claire-Calc</title>
<link rel="stylesheet" href="styles.css" />
</head>
<!-- i have used styling in html body to set background-color to cyan -->
<body style="background-color: cyan">
<!-- i have used styling in html class calculator to set background-color to #c6c4ff-->
<div class="calculator" style="background-color: #c6c4ff">
<input type="text" class="calculator-screen" value="" disabled />
<!-- set a div container to hold all components of our cals characteristics (calculator-keys) -->
<div class="calculator-keys">
<!-- operators are +,-,* & / -->
<button type="button" class="operator" value="+">+</button>
<button type="button" class="operator" value="-">-</button>
<button type="button" class="operator" value="*">×</button>
<button type="button" class="operator" value="/">÷</button>
<!-- our numbers from 0-9 and arrange them how calc looks like -->
<button type="button" value="7">7</button>
<button type="button" value="8">8</button>
<button type="button" value="9">9</button>
<button type="button" value="4">4</button>
<button type="button" value="5">5</button>
<button type="button" value="6">6</button>
<button type="button" value="1">1</button>
<button type="button" value="2">2</button>
<button type="button" value="3">3</button>
<button type="button" value="0">0</button>
<!-- in cal we have decimal values-->
<button type="button" class="decimal" value=".">.</button>
<!-- to clear our inputs we add a AC button with a class all-clear -->
<button type="button" class="all-clear" value="all-clear">AC</button>
<!-- button equal sign -->
<button type="button" class="equal-sign operator" value="=">=</button>
</div>
</div>
<!-- link script.js files -->
<script src="script.js"></script>
</body>
</html>