I have checked multiple other questions and none of them seemed to work. And no, I would not like to use .innerHTML because that would make it not work. Heres my code:
generation.textContent=
"<!DOCTYPE html>X"+
"<html>"+
"<head>"+
"<style>"+
cinput+
"<\/style>"+
"<\/head>"+
"<body>"+
hinput+
"<script>"+
jinput+
"<\/script>"+
"<\/body>"+
"<\/html>";
After each plus sign/line there needs to be a linebreak.