Is it possible to include a header and footer file using HTML?
I have my file as a .html and need to be able to include the HTML for the header and footer.
Anyone know how I can do this?
Printable View
Is it possible to include a header and footer file using HTML?
I have my file as a .html and need to be able to include the HTML for the header and footer.
Anyone know how I can do this?
You have to use PHP.
Made your index.php instead of index.html. you can make header.php and footer.php, then call them from index.php. So the code in header.php willlbe placed in index.php and will be processed and displayed.
<?php
$html_title = "Home";
$html_keywords = "academy, insa, fosma, massa, nigdi, pune, merchant navy, indian navy, voluntary youth, nda, army, air force, coast guard, marine, para military forces";
$html_description = "Academy";
include("./header.php");
?>
The html code will follow and then you have to call footer.php as
<?php
include("./footer.php");
?>