html
html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<pre>
<code id="code1"></code>
</pre>
<script>
//use template literal and assign it to the textContent of a code tag.
code1.textContent =
`<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>
<pre>
<code>
Insert the code using javascript and template literals.
</code>
</pre>
</body>
</html>`
</script>
Enter to Rename, Shift+Enter to Preview
css
css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
*{
margin:0;
padding:0;
box-sizing:border-box;
font-family:sans-serif;
}
body{
display:grid;
place-items:center;
}
code,
.fakepre{
font-family:monospace;
outline:1px solid black;
display:inline-block;
width:340px;
max-width:340px;
white-space:pre-wrap;
word-wrap:break-word;
padding:15px;
}
pre,
.fakepre{
margin:0 auto;
}
Enter to Rename, Shift+Enter to Preview
js
js
1
Enter to Rename, Shift+Enter to Preview
BROWSER
Console
Run