I have a webpage and i have a nav that stays the same throughout the whole site. i have around 5 pages. is there a way to put the nav html code into a separate html file so can edit it without having to go to each page and change it in each page?
Asked
Active
Viewed 24 times
0
-
which programming language are you using? – Chandra Shekhar Aug 11 '17 at 01:56
-
Im using HTML and CSS – Tristan Frederick Aug 11 '17 at 01:58
-
make use of some templating engines like pug, or ejs, or else use php, – Chandra Shekhar Aug 11 '17 at 01:59
-
Not inherent in HTML and CSS unless you try and get iframes to do that for you but, well, probably don't. The best bet IMHO is to find an editor which allows you to create templates which can accept custom library elements (your nav) so that when you update the nav you can update all the pages that use it. I've used dreamweaver for this but a Google of free alternatives is worth looking into - I see a number of popular editors there. Or use a CMS like Wordpress. – wunth Aug 11 '17 at 02:05