<!DOCTYPE html>
<html lang="en">
<head>
  <title>Document</title>
</head>
<body>
  <h1>HTML ONLINE COMPILER</h1>
  <div>
    <input style="height:5rem;" value="<h1>Example</h1>" size="60" type="text" id="code" />
  </div>
  <hr />
  <h2>Output</h2>
  <div id="output">
    <h1>Example</h1>
  </div>
</body>
</html>
const code = document.getElementById('code');
const output = document.getElementById('output');

code.oninput = () => { 
// insert the input (#code) value into the div that its id is 'output' 
  output.innerHTML = code.value;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.