about summary refs log tree commit diff
path: root/usth/ICT3.2/prac/3/1-vanilla.html
diff options
context:
space:
mode:
Diffstat (limited to 'usth/ICT3.2/prac/3/1-vanilla.html')
-rw-r--r--usth/ICT3.2/prac/3/1-vanilla.html18
1 files changed, 18 insertions, 0 deletions
diff --git a/usth/ICT3.2/prac/3/1-vanilla.html b/usth/ICT3.2/prac/3/1-vanilla.html
new file mode 100644
index 0000000..160b413
--- /dev/null
+++ b/usth/ICT3.2/prac/3/1-vanilla.html
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<body>
+  <h1>Introduction</h1>
+  <div>
+    <h1>About HTML</h1>
+    <h1>About CSS</h1>
+  </div>
+  <h1>About JavaScript</h1>
+
+  <script>
+    for (let parent of document.getElementsByTagName('div'))
+        for (let child of parent.children)
+            if (child.tagName == 'H1')
+                child.setAttribute('style', 'background-color: #436e58')
+  </script>
+</body>
+</html>