As a final note, if you define nested templates, you will need to clone each template explicitely in order to use it.

Custom Elements

Custom elements attempt to solve the semantic gap between HTML that was designed to represent documents and building rich internet applications. By providing the ability to create custom elements, the custom element standard allows you to define markup with the appropriate semantics for your application.

The use of semantic markup has many advantages:

Increases the readability of your application ( and thus speed of development and maintainability)

Would you like to receive more articles like this one on programming, web development, JavaScript, Angular, developer productivity, tools, UX and even exclusive content like free versions of my books in your mailbox? Then sign up to my super duper awesome inner circle.

Did Ya Know I've Written Some Books?

I have! The JavaScript-mancy series is the lovechild of three of my passions: JavaScript, writing and Fantasy. In the pages of each one of the books of the series you’ll find a breadth of JavaScript knowledge, delivered with a humorous and casual style of writing and sprinkled with Fantasy at every turn.

They are the weirdest and quirkiest JavaScript books you'll ever find. There's nothing out there quite like it.