<body> <div id="h"> </div> <input type="button" id="b1" value="Press" onclick="h()"/> </body>
function h() { var eleh=document.createElement("h3"); var text=document.createTextNode("This is 99codingexamples."); eleh.appendChild(text); document.getElementById("h").appendChild(eleh); }
h3 { color:red; font-weight:bold }