Skip to content

Commit 8df158f

Browse files
committed
Add step value for input fields
1 parent 145dafd commit 8df158f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

index.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
</head>
66
<body>
77
<h1>Tip Calculator</h1>
8-
Amount: <input type="number" id="amount" min="0" required /> Tip
9-
Percent: <input type="number" id="tip-percent" min="0" required />
8+
Amount:
9+
<input type="number" id="amount" min="0" step="0.01" required /> Tip
10+
Percent:
11+
<input type="number" id="tip-percent" min="0" step="0.01" required />
1012
<button id="calculate">Calculate Tip Amount</button>
1113
<div id="output"></div>
1214
<script src="main.js"></script>

0 commit comments

Comments
 (0)