Get References from HTML Built with Template Literals
One thing JavaScript template literals are great at is little blocks of HTML. Like:
// Probably from some API or whatever
const data = {
title: "Title",
content: "Content"
};
const some_html = `
<div class="module">
<h2>${data.title}</h2>
<p>${data.content}</p>
</div>
`;
…