0

I have multiple HTML pages having almost identical code. I would like to move the common code to a shared HTML file (say commons.html)and whichever page requires this common code would access it from commons.html . I want to do the above stated for ease of maintainability.

I am constrained to use pure HTML and javascript . So the question is how do i use markups from another html page (in this case commons.html)

Manas Saxena
  • 2,171
  • 6
  • 39
  • 58
  • 1
    what have you looked into \ researched or tried so far? – Simon Price Jun 14 '16 at 14:03
  • 1
    Check out [jade](http://jade-lang.com/) or [handlebars](http://handlebarsjs.com/) or [dust](http://www.dustjs.com/). The task you are trying to accomplish is called [HTML templating](https://en.wikipedia.org/wiki/Web_template_system) – Patrick Roberts Jun 14 '16 at 14:04
  • So far i have seen people use php 's include tag or iframes. But i am constrained to use pure html and js also iframes i believe are discouraged – Manas Saxena Jun 14 '16 at 14:04

0 Answers0