<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>JavaScript Template</title>
</head>
<body>
<div id="app"></div>
<script>
// JavaScript code using template literals
const name = "John";
const template = `
<h1>Hello, ${name}!</h1>
<p>Welcome to our website.</p>
`;
// Injecting the template into the DOM
document.getElementById("app").innerHTML = template;
</script>
</body>
</html>
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.