Including header file using HTML - testmy.net resource / tool
Home
Welcome, Guest. Please login or register.
Did you miss your activation email?

 



donations help testmy.net pay for the very high cost to run the site. Any amount is greatly appreciated.
Click to read why...

  spcr
    
News : undecided Is blue NOT your favorite color?  Well why not customize testmy.net to your liking?!  We offer over 25 theme variations, there is sure to be at least one that suits your personal style, choose one here cool December 05, 2008, 10:16:34 AM
testmy.net Broadband  |  Main Forum  |  HELP!  |  Programming and Website Help  |  PHP  |  Topic: Including header file using HTML Advanced search

Recommended Tests

Click here to run a free Performance Scan
  Test PC Performance:
     Click here to run a free Performance Scan
    Test PC Stability:
     Click here to run a free Registry Scan


Note: The links above are sponsored links
  0 Members and 1 Guest are viewing this topic. « previous next »
Pages 1 Go Down
Author
Topic: Including header file using HTML  (Read 765 times)
SharonB
Earning Trust
*
Offline Offline

Posts: 3



View Profile
« on: March 31, 2008, 02:40:31 PM »

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?
Logged

I'm here!
dlewis23
Global Moderator
TMN Seasoned Veteran
*
Online Online

Gender: Male
Posts: 9774


HEY! ill put it down when im good and ready.


View Profile
« Reply #1 on: March 31, 2008, 02:50:52 PM »

you could use <?php include("header.html"); ?>

Otherwise use a template system.
Logged
nanobot
News Anchor
TMN Friend
*
Offline Offline

Gender: Male
Posts: 254



View Profile WWW
« Reply #2 on: March 31, 2008, 03:37:24 PM »

You could also use:

Code:
<iframe
src ="header.html"
width="100%" frameborder="0">
</iframe>

or add:

Code:
height="[number]px"

Between the width and Frameborder declaration to adjust the height. (Replace [number] with your number)

But Dlewis's way works too.
Logged


NanoTech - World Forum
92% of the teenage population has switched to rap. If you are in the 8% who ROCKS, copy & paste this in your signature
dlewis23
Global Moderator
TMN Seasoned Veteran
*
Online Online

Gender: Male
Posts: 9774


HEY! ill put it down when im good and ready.


View Profile
« Reply #3 on: March 31, 2008, 07:03:55 PM »

You could also use:

Code:
<iframe
src ="header.html"
width="100%" frameborder="0">
</iframe>

or add:

Code:
height="[number]px"

Between the width and Frameborder declaration to adjust the height. (Replace [number] with your number)

But Dlewis's way works too.

You shouldn't really use iframes anymore as main browsers are starting not too support them as we move away from basic html.
Logged
Print  Pages 1 Go Up
testmy.net Broadband  |  Main Forum  |  HELP!  |  Programming and Website Help  |  PHP  |  Topic: Including header file using HTML « previous next »
Jump to:  

    
testmy.net's forum is proudly Powered by SMF | SMF © 2006-2007, Simple Machines LLC
Bookmark: Del.icio.us    StumbleUpon
 
 

 

© 1999-2008 testmy.net - Contact - Legal - Facts & FAQs
Page Loading Stats: This forum Page created in 0.089 seconds with 32 queries.