Skip to main content

Creating Master Page for HTML Websites

In this blog, you will learn how to create master page for Html/Static Sites, We can create master page using PHP.

Step1: Change the Name of your file extension. index.html(all files extension)  into index.php




Step2: Create header.inc.php and footer.inc.php files.




Step3: Add header elements and navigation bar into header.inc.php and  Add footer files into footer.inc.php
(Whatever you want to show in all pages(masterfile))




Step4: Remove the header and navbar, footer elements inthe index file and put the 

<?php include_once 'includes/header.inc.php';?> - header section
<?php include_once 'includes/footer.inc.php';?> - footer section








Step5: Now you load the index.php file, Finally Website master page created






Comments