Knowledge Walls
John Peter
Pune, Maharashtra, India
How to append tag in javascript using createElement
1603 Views
CreateElement() and appendChild() 
createElement() method to create the element in javascript then append the element to the selected element using appendChild() method of javascript.
Example
var element = document.createElement("DIV");
var textNode = document.createTextNode("JS is Good");

document.body.appendChild(element);
element.appendChild(textNode);
element.style.color = "blue";
Demo & Output 
Best Lessons of "One day One Thing to Know"
Top lessons which are viewed more times.
  Copyright © 2014 Knowledge walls, All rights reserved
KnowledgeWalls
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details