-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
35 lines (32 loc) · 1.04 KB
/
index.html
File metadata and controls
35 lines (32 loc) · 1.04 KB
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
<!-- Design and implement a web page that dynamically creates a series of boxes having varying
widths and colors using Vanilla JavaScript, HTML and CSS.
Requirements:
- Dynamically generate boxes inside a container on the webpage.
- Each box should be clickable. Display an alert with the color of the clicked box.
- Write scalable, clean, readable, and well-structured code.
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Config Driven Boxes</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<!-- Assignment solution -->
<form id="boxForm">
<input type="color" id="colorInput" title="Choose box color" />
<input
type="number"
id="widthInput"
placeholder="Enter box width (%)"
min="1"
max="100"
/>
<button type="submit">Add Box</button>
</form>
<!-- Assignment solution -->
<script src="script.js"></script>
</body>
</html>