Results 1 to 7 of 7

Thread: Including header file using HTML

  1. #1
    Join Date
    Dec 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Including header 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
    May 2006
    Posts
    266
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    there are many ways to do this, how would you like to do it ifram or include script.

    I have both i can post them but don't have access to them
    The web in one word.

  3. #3
    Join Date
    Dec 2006
    Location
    http://andersmoen.com
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Either you use an <iframe> tag, or you do something much better: PHP
    The PHP code there is:
    <?php
    include("yoursite.php");
    ?>

    But if your host won't let you use PHP, you should use <iframe>:
    <iframe width="number" height="number" border="0"></iframe>

  4. #4
    Join Date
    May 2006
    Posts
    266
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    no no no, there is no need for php i use the following code.
    works all browsers.

    <!--webbot bot="Include" U-Include="header/head.html"
    TAG="BODY" -->
    and you save page as .html
    The web in one word.

  5. #5
    Join Date
    Nov 2006
    Posts
    99
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    PHP works in all browsers too.

  6. #6
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,162
    Thanks
    263
    Thanked 690 Times in 678 Posts

    Default

    But not on all servers. That relies on the server being set to interpret the file like that. If you have PHP, it would work the same way. PHP works in all browsers too... that's because both ways output just html, and the browsers doesn't need to do anything but parse the html... unlike javascript or an iframe tag where the browser actually does it.

    I don't know if the OP was even talking about this, though. Do you mean like in word, with a header and footer with titles and such? Not sure how that applies... do you mean when printing? Or?
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  7. #7
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,925
    Thanks
    43
    Thanked 3,187 Times in 3,151 Posts
    Blog Entries
    12

    Default

    Quote Originally Posted by queerfm View Post
    no no no, there is no need for php i use the following code.
    works all browsers.

    <!--webbot bot="Include" U-Include="header/head.html"
    TAG="BODY" -->
    and you save page as .html
    That requires a server with FrontPage extensions enabled and functioning properly.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •