web-mode.el is an emacs major mode for editing web templates aka HTML files embedding client parts (CSS/JavaScript) and server blocks.
web-mode.el is compatible with many template engines: PHP, JSP, ASP, Django, Twig, Jinja(2), ERB, FreeMarker, Velocity, Cheetah, Smarty, CTemplate, Mustache, Blade, ErlyDTL, Go Template, Dust.js, Google Closure (soy), etc.
More infos on http://web-mode.org/