Science, Tech, Math › Computer Science How to Template Your Site Template your website headers and footers for easy application Share Flipboard Email Print Eternity in an Instant/Photodisc/Getty Images Computer Science PHP Programming Tutorials MySQL Commands Perl Python Java Programming Javascript Programming Delphi Programming C & C++ Programming Ruby Programming Visual Basic View More by Angela Bradley Angela Bradley is a web designer and programming expert with more than 15 years of professional experience. Updated September 03, 2017 When each page of your website follows the same design theme, it is easy to create a template for the site using HTML and PHP. The specific pages of the site hold only their content and not their design. This makes design changes easy because changes take place on all the pages of the website at once, and there is no need to individually update specific pages when the design changes. Creating a Site Template The first thing you need to do is create a file called header.php. This file holds all the page design elements that come before the content. Here is an example: My Site My Site Title My Site menu goes here........... Choice 1 | Choice 2 | Choice 3 Next, make a file called footer.php. This file contains all the site design information that goes beneath the content. Here is an example: Copyright 2008 My Site Finally, create the content pages for your site. In this file you: Call the header file (header.php)Put in the page-specific contentCall the footer file (footer.php) Here is an example of how to do this: Sub-Page Title Here is the specific content of this page.... Tips Remember to save all your files with the .php extension.You can have more than a header and a footer. If needed, create other files to include in the middle and call them the same way.Couple your templates with the use of a style sheet to change style within the page-exclusive content. Continue Reading