Resources for the new HTML template element

In draft state at the W3C, the new <template> element is making its way into the HTML spec. The description of the document states, “This specification describes a method for declaring inert DOM subtrees in HTML and manipulating them to instantiate document fragments with identical contents.”

If you’ve used server side includes, or library items in Dreamweaver, or templates (not the same thing as the proposed <template> element) in Dreamweaver you understand the concept. Certain parts of a page or site with identical contents get inserted into the page using special commands or tags. The contents of those repeating elements are defined elsewhere than right on the page.

Implementation is a ways down the line, but you should be aware of what’s coming. Here’s a list of resources where you can read more about the <template> element.

As you can see from looking at this brief list of resources, the description of the proposed element and the code examples for how it will be implemented are sparse. In my opinion this is not ready for classroom instruction or implementation into web pages. But if you feel like constructing test cases you could add useful information to the topic.

Leave a Reply