We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 398aff7 commit 4c44918Copy full SHA for 4c44918
Dom Task/index.html
@@ -0,0 +1,13 @@
1
+<!DOCTYPE html>
2
+<html lang="en">
3
+<head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>DoM Manipulation</title>
7
+</head>
8
+<body style="background-color: black; color: white;" >
9
+
10
+ <h1 id="first">Hello</h1>
11
+ <script src="./script.js"></script>
12
+</body>
13
+</html>
Dom Task/script.js
@@ -0,0 +1,17 @@
+/*
+Create a new Element and Print it after heading
+*/
+const newElement=document.createElement("h2")
+newElement.textContent="Javascript"
+const element=document.getElementById("first")
14
15
+element.after(newElement)
16
17
0 commit comments