-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
86 lines (83 loc) · 3.48 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" type="text/css" href="style.css">
<title>Unit Converter</title>
</head>
<body>
<h1 class="title">Unit Converter App</h1>
<div class="container">
<h1>Weight Conversion</h1>
<div class="form">
<div class="firstUnit">
<label for="weight">Enter weight:</label>
<input type="number" id="weight" placeholder="Enter weight" oninput="convertWeight()">
<select id="weightFrom" onchange="convertWeight()">
<option value="kg">Kilograms (kg)</option>
<option value="lbs">Pounds (lbs)</option>
<option value="oz">Ounces (oz)</option>
</select>
</div>
<span>to</span>
<div class="secondUnit">
<input type="text" id="weightResult" disabled>
<select id="weightTo" onchange="convertWeight()">
<option value="kg">Kilograms (kg)</option>
<option value="lbs">Pounds (lbs)</option>
<option value="oz">Ounces (oz)</option>
</select>
</div>
</div>
</div>
<div class="container">
<h1>Temperature Conversion</h1>
<div class="form">
<div class="firstUnit">
<label for="temperature">Enter temperature:</label>
<input type="number" id="temperature" placeholder="Enter temperature" oninput="convertTemperature()">
<select id="tempFrom" onchange="convertTemperature()">
<option value="c">Celsius (°C)</option>
<option value="f">Fahrenheit (°F)</option>
<option value="k">Kelvin (K)</option>
</select>
</div>
<span>to</span>
<div class="secondUnit">
<input type="text" id="tempResult" disabled>
<select id="tempTo" onchange="convertTemperature()">
<option value="c">Celsius (°C)</option>
<option value="f">Fahrenheit (°F)</option>
<option value="k">Kelvin (K)</option>
</select>
</div>
</div>
</div>
<div class="container">
<h1>Distance Conversion</h1>
<div class="form">
<div class="firstUnit">
<label for="distance">Enter distance:</label>
<input type="number" id="distance" placeholder="Enter distance" oninput="convertDistance()">
<select id="distanceFrom" onchange="convertDistance()">
<option value="m">Meters (m)</option>
<option value="km">Kilometers (km)</option>
<option value="mi">Miles (mi)</option>
</select>
</div>
<span>to</span>
<div class="secondUnit">
<select id="distanceTo" onchange="convertDistance()">
<option value="m">Meters (m)</option>
<option value="km">Kilometers (km)</option>
<option value="mi">Miles (mi)</option>
</select>
<input type="text" id="distanceResult" disabled>
</div>
</div>
</div>
<script src="script.js"></script>
</body>
</html>