Raw Variable Interpolation in HTML with Pug

Watch out! This tutorial is over 6 years old. Please keep this in mind as some code snippets provided may no longer work or need modification to work on current systems.
Tutorial Difficulty Level    

Content interpolated with bracket syntax will be evaluated for code, the output of which is included in your HTML output.

title follows the basic pattern for evaluating a template local, but the code in between #{and } is evaluated, escaped, and the result buffered into the output of the template being rendered. [Source]

If you need to include raw HTML syntax, use an exclamation point instead of a pound symbol (!{} instead of #{}).

let tag = "<div>You can't escape me!</div>";
res.render("index", {
    myTag: tag
});
doctype html
html
    head
    body
        !{myTag}
doctype html
html
    head
    body
        !{myTag}