当前位置: 动力学知识库 > 问答 > 编程问答 >

html5 - reusing common sections in a webpage

问题描述:

Ok, I have searched on web and stackoverflow too, but no success.

I just want the code of header, nav-bars, footers etc. to be reused. I just want them to sit at their own respective files and then I want all other file to link these files.

How will we do these in html5 way.

Can someone please help me?

Thanks

Raja

网友答案:

This isn't really possible with plain HTML. For reusing HTML chunks in your web page you basically have two options: 1. Server side templates via PHP, Twig, Smarty or the likes. 2. Or you can do client side templates with MustacheJS, Jade or Handlebars.

分享给朋友:
您可能感兴趣的文章:
随机阅读: