MDN self-hosted library · e01.org

HTMLTemplateElement: htmlFor property

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

html
<template for="my-identifier"> Lorem Ipsum... </template>
js
console.log(document.querySelector("template").htmlFor);
// my-identifier