Results 1 to 2 of 2

Thread: Is it possible to include header and footer file using HTML

  1. #1
    Join Date
    Mar 2007
    Posts
    31

    Default Is it possible to include header and footer file using HTML

    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?

  2. #2
    Join Date
    Sep 2006
    Location
    Kerala, India
    Posts
    17,476

    Default You have to use PHP

    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");

    ?>

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •