Header/Footer issue

mshikibu

New member
What is the easiest way to design header and footer files that place on all pages? CSS or Server Side Includes? I don't know how to do either.

I'm trying to figure this out on my own. It looks like there are several ways this can be done: Java, JavaScript, CSS, even html. I have about 400 commercial pages designed with my old self-taught html code. I managed to do a change from http to https today, and I'm proud of that, actually. But I need a little more direction with the header/footer thing.

Right now, if I want to change the footer, say for example, the copyright date, I have to go in and change every page, and it takes all day!
 
Last edited:
I was given a couple of pieces of code, but I don't know where to put them or what else I need to do. Also, I already have an .https file, but I used it for the https code.

HEADER:
<?php
if (!defined('IS_PUBLIC_DOC))
{
exit;
}
?>
<!DOCTYPE html>
<head>
<link href="https://example.com/css/stylesheet.css" rel="stylesheet">
<head>

FOOTER:
<?php
if (!defined('IS_PUBLIC_DOC))
{
exit;
}
?>
<div>your footer content</div>
<p>Copyright Kara <?php echo date('Y'); ?></p>
</body>
</html>
 
create two separate files header.php and footer.php

<?php include('path/to/header.php');?> // in the location you want the header in the page

<?php include('path/to/footer.php');?> // in the location you want the footer
 
You are correct, it must be difficult as I have not received an answer either
My information does not work, but I can give you my source
www.uvm.edu
page headers and footers
stackoverflow.com
how to add a header to all html pages
 
This forum has others assking similar questions
"include other html fiiles into a static html file"
Dinomite. sep 9 2019
"how to include duplicate markup in every web page"
teck@onatec jun 17 2013
If you find the answer please list it
thank you
falcon
 
You are correct, it must be difficult as I have not received an answer either
My information does not work, but I can give you my source
www.uvm.edu
page headers and footers
stackoverflow.com
how to add a header to all html pages

That link is to the university, not to any source code.

I have given up on this. No one will help me and the stuff I've tried does not work.
 
www.uvm.edu university of vermont
javascript-external files-page headers and footers

how to add a header to all html pages

hope this helps
never give up
they list the code
falcon
 
No. Why would that help me?
found the answer and tested
<embed type="text/html" src="header.html" width="100% height="100%""></embed>
note:
install where you want it displayed
header.html is the external html name
height and width is your choice
falcon
 
Back
Top