-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
30 lines (27 loc) · 978 Bytes
/
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Age Calculator</title>
<!-- Link to the external CSS file for styling -->
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="container">
<h1>Age Calculator</h1>
<!-- Form to input date of birth -->
<form id="ageForm">
<label for="dob">Enter your date of birth:</label>
<!-- Date input for user to enter their date of birth -->
<input type="date" id="dob" name="dob" required>
<!-- Button to submit the form -->
<button type="submit">Calculate Age</button>
</form>
<!-- Div to display the result -->
<div id="result"></div>
</div>
<!-- Link to the external JavaScript file for functionality -->
<script src="script.js"></script>
</body>
</html>