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

HTL

< >

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

#1233on PLDB 5Years Old
Download source code:
git clone https://github.com/observablehq/htl
HomepageSource 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鈥檚 yellow (and italic).</span>`
View source
- Build the next great programming language Add About Search Keywords Livestreams Labs Resources Acknowledgements Part of the World Wide Scroll