Home
Topics
Practice
Roadmap
DSA Tracker
Code Editor
Tech Blogs
More
Sign in
Get started
Loading question...
Feedback
Create DOM Element
Easy
00:00
0 users online
Share
Description
Solution
Submissions
Discussion
Create and append a DOM element using JavaScript.
Sample Input:
"div", "Hello World"
Sample Output:
<div>Hello World</div>
Hints
Hint 1
Use document.createElement() to create element
Hint 2
Use element.textContent or innerHTML for content
Hint 3
Use element.appendChild() to add to DOM
Code Editor
Reset
Run
Save
Loading...