-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path01. DOM Manipulation.html
69 lines (59 loc) · 1.48 KB
/
01. DOM Manipulation.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Day-09 DOM Manipulation</title>
<style>
.bgColorChange {
width: 100px;
height: 100px;
background-color: yellow;
}
.firstImage {
width: 300px;
height: 320px;
object-fit: contain;
}
.hoverElement {
width: 100px;
height: 100px;
border: 2px solid black;
}
.removeClass {
color: red;
}
.addClass {
color: blue;
}
</style>
</head>
<body>
<!-- Task 1 -->
<div id="changeText">Original Text Content</div>
<!-- Task 2 -->
<div class="bgColorChange">Change Background Color</div>
<!-- Task 4 -->
<ul>
<li>Adding Item to existing list</li>
</ul>
<!-- Task 5 -->
<div id="removeMe">Remove this element</div>
<!-- Task 6 -->
<div id="parentElement">
<div>First child</div>
<div>Second child</div>
</div>
<!-- Task 7 -->
<img src="./firstImage.png" alt="firstImage" class="firstImage" />
<!-- Task 8 -->
<div class="elem addClass">Class manipulation</div>
<!-- Task 9 -->
<button>Click me</button>
<p>Original paragraph text</p>
<!-- Task 10 -->
<div class="hoverElement">Hover over me</div>
<!-- script link -->
<script src="01. DOM Manipulation.js"></script>
</body>
</html>