-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathElement.html
More file actions
27 lines (18 loc) · 770 Bytes
/
Element.html
File metadata and controls
27 lines (18 loc) · 770 Bytes
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
<!--Element6-->
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>DOM Manipulation</title>
</head>
<body>
<!-- This text starts as red because JavaScript modifies its color style -->
<h2 class="red" id="toBlue">this text is blue in css but it's display red</h2>
<!-- This text starts blue but changes to red when the button is clicked -->
<h2 class="red" id="ClickToBlue">and this text is blue if I click the button, it will be red</h2>
<!-- Button triggers the changeColor function to modify the text color -->
<button onclick="changeColor()">Change Color</button>
<script src="script.js""></script>
<script src=" ../../Don't touche/adv.js"></script>
</body>
</html>