packages/lit-dev-content/site/docs/v2/templates/overview.md
{% todo %}
If time permits, add new page on working with inputs, per outline.
{% endtodo %}
Lit templates are written using JavaScript template literals tagged with the html tag. The contents of the literal are mostly plain, declarative, HTML:
html`<h1>Hello ${name}</h1>`
The template syntax might look like you're just doing string interpolation. But with tagged template literals, the browser passes the tag function an array of strings (the static portions of the template) and an array of expressions (the dynamic portions). Lit uses this to build an efficient representation of your template, so it can re-render only the parts of template that have changed.
Lit templates are extremely expressive and allow you to render dynamic content in a variety of ways:
You can also use Lit's templating library for standalone templating, outside of a Lit component. For details, see Standalone lit-html templates.