Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML

Same header/footer for multiple webpages

Hi there, I am still pretty new to coding. So I think this is probably not really difficult. But I am trying to get the same header/footer for multiple webpages that belong to one website. So I don't have to write the same header/footer on every new webpage again. I guess I have to link it. I tried it with document write in JavaScript and added a link, which was working out fine. But maybe there is a better way. Thanks, Kate

2 Answers

Andrey Misikhin
Andrey Misikhin
16,529 Points

I think this is called a template engine and can be written only on the server side using php, python, nodeJS, ruby and etc Parts of pages are dynamically generating on the server and sending to the user as one html document.

thanks Andrey. I think I found it on the php course