Top 1K Features Creators Events Podcasts Books Extensions Interviews Blog Explorer CSV

HTL

< >

HTL is a template language created in 2019 by Mike Bostock.

#1247on PLDB 5Years Old
Download source code:
git clone https://github.com/observablehq/htl
Homepage · Source Code

Inspired by lit-html and HTM, and referencing the fantastically precise HTML5 spec, we built hypertext literal: a tagged template literal for HTML which interpolates values based on context, allowing automatic escaping and the interpolation of non-serializable values, such as event listeners, style objects, and other DOM nodes.


Example from the web:
html`<span style="background: ${"yellow; font-style: italic"};">It’s yellow (and italic).</span>`

- Build the next great programming language · Add · Issues · About · Search · Keywords · Livestreams · Labs · Resources · Acknowledgements

Built with Scroll v164.7.0