Lets use the JavaScript Document Object Method (DOM) to create a new <div> and write some information to it by clicking here.
We have now created a new <div>, given it an id="new", inserted it into the document flow, styled and added some text to it.
At the same time we've told the <div id="new_two"> which the CSS had 'hidden' to become visible by using the DOM to write a new 'display' attribute with a value of 'block'. Simultaneously another script determines your Date & Time which is also written to the page.
Finally, the opening paragraph in <div id="old"> is now hidden by again using the DOM to change the styling to display = "none".
All the HTML, CSS and JavaScript can be seen by viewing the source code.