Don’t forget to subscribe to the Junior Developer Central channel for more videos and tutorials!
You will see that the process of creating the element itself is also a two-stage process. We need first create the HTML tag itself and then add content inside that which can either be a text node or more HTML elements inside the parent node.
Once we’ve created our first div element we’ll look at how we can customise this before it gets added to the DOM. For example, we will look at doing the following tasks with our newly created element: