The innerHTML property is used to write the HTML code using JavaScript dynamically. Let's see a simple example: