Take the 2-minute tour ×  I just stumbled upon something I've
never seen before. In the source of Backbone.js's example TODO
application (Backbone TODO Example) they had their templates
inside a <script type = "text/template"></script>, which
contained code that looks like something out of PHP but with
JavaScript tags.  Can someone explain this to me? Is this legit?
share|improve this question Great question and answer. I just
ran across this trick in the new YUI App Framework code:
new.yuilibrary.com/yui/docs/app/app-todo.html –  mjhm Aug 18 '11
at 20:53 What about type="text/tcl" which I saw in the W3C doc?
How to use it? (Should I ask another question?) –  L01man Jun 11
'12 at 14:11 @L01man yes, you should ask another question. – 
Nate Glenn Feb 17 '13 at 22:05  7 Answers 7  up vote 220 down
vote accepted  Those script tags are a common way to implement
templating functionality (like in PHP) but on the client side.
By setting the type to "text/template", it's not a script that
the browser can understand,