Adicionar variável no Innerhtml
<body>
<div id="app"></div>
<script>
const app = document.getElementById('app');
let content = "<div>This is the main content<button>click me!</button></div>";
app.innerHtml = content;
</script>
</body>
Julio Polycarpo