/Web APIs


The HTMLTemplateElement interface enables access to the contents of an HTML <template> element.

EventTarget Node Element HTMLElement HTMLTemplateElement

Instance properties

This interface inherits the properties of HTMLElement.

content Read only

A read-only DocumentFragment which contains the DOM subtree representing the <template> element's template contents.

Instance methods

This interface inherits the methods of HTMLElement.


Browser compatibility

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari WebView Android Chrome Android Firefox for Android Opera Android Safari on IOS Samsung Internet
HTMLTemplateElement 26 13 22 No 15 8 4.4 26 22 14 8 1.5
content 26 13 22 No 15 8 4.4 26 22 14 8 1.5

© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.