|
|
|
|
Header and Footer Inclusion for Beginners
Home » PHP » Content Management
Header and Footer Inclusion for Beginners
Let's pretend you have 10 pages in your site with the same design and you want to change a link in your menu. You would have to edit all 10 pages, right? Nope, there's a much quicker way allowing you to edit just one file and it's not as hard as it sounds. What we have to do is create a header file and a footer file. The header file contains all the HTML code for the top portion of your site. The footer contains the HTML for the bottom. Content goes between the header and footer. Let's get started...
Let's pretend you have 10 pages in your site with the same design and you want to change a link in your menu. You would have to edit all 10 pages, right? Nope, there's a much quicker way allowing you to edit just one file and it's not as hard as it sounds.
What we have to do is create a header file and a footer file. The header file contains all the HTML code for the top portion of your site. The footer contains the HTML for the bottom. Content goes between the header and footer. Let's get started...
This is an entire HTML document to give you an idea of what the header and footer are and where the content fits in. The header is in blue, content is in red, and footer is in green.
|
More Tutorials by this user
|
|
|
|
|
|
|
|
|