Changing the contents within div tags

In your html <!– div element used for placing html within –> <div id="my_target_div"></div> To manipulate text within a block of text you could you span instead of div In your javascript document.getElementById('my_target_div').innerHTML = "<p>Hello</p>";   If using jquery $("#my_target_div").html("<p>Hello</p>"); Note that this will overwrite if you already have content between the div tags

Read More