Creating Other Pages

Is it possible to create other web pages without having to copy and paste the footer
every time on every single page?

Yes, if you use php, you can create separate files for common page elements like headers, footers and menus. you then add them as an include on every page that needs it.
If you edit say, the menu file once, every page that uses that include updates.

What language are you talking?

For example, with PHP, even without getting into MVC, it’s quite possible, and even beneficial, to include common “components” of a web page.

i.e. if all pages have the same head, header, navigation links, footer, etc. it’s much less work to maintain each in it’s own file.


// header markup here


include header.php;
include navigation.php;
// page content here
include footer.php;

I dont know how to use PHP guys haha

It is not difficult to do, even if you have little or no php experience.
So long as your server has php, you just need to save your pages with the .php extension, instead of .html then add an include where needed, like this:-

<?php include $_SERVER["DOCUMENT_ROOT"] . "/includes/footer.php"; ?>
1 Like

Well then, what server-side language are you using?

If the web server is configured for using SSI:

<!--#include virtual="a.html" --> 

If not, you can always use jQuery .load().

If not jQuery or a server-side language (PHP, ASP, CF), lots of luck. :smile:



It’s been a l …o … n … g time since I’ve used SSI, but don’t the pages need the shtml extension?

what does this mean?

It is scripting that is carried out by the server where the website is, rather than the visitor’s computer.

You don’t need to use a server-side language. You could simply FTP static HTML, CSS, JavaScript and image files and do OK without ever using it.

Especially if you have a smallish site that doesn’t change often.

But if you want to have dynamic pages (i.e. content from a database) and take full advantage of what is possible, (eg. include-ing mark-up common to many pages) you really should delve into it.

It’s been a long time since I’ve heard of a host that didn’t provide some sort of server-side language. My bet is you have PHP, though it could be another

I am using

Yeah I will be doing this a lot…

Do you usually upload your files using an FTP app or though a UCP ?

In either case try this.

Make a simple file like

echo "<h1>Hello PHP</h1>";

Name it “hello.php” and upload it to your server.
Then go to the page using your browser.

If you see a big Hello PHP
you have PHP
If you get an error message or see the plain text version of the file, you don’t

I use Filezilla FTP.

Ok ill try it.

He uses ASP, is that correct? AFAIK that’s the language I’ve seen.

Do you use ASP?

Not anymore. Im starting out in a clean slate using purely HTML and CSS.

HTML/CSS doesn’t remove the need for backend languages like ASP though. Could you please tell us all the languages you know? E.g. HTML, CSS, ASP…etc :slight_smile: .

I just know HTML and CSS. ASP was used by the previous deisgner/developer I only picked up very
little from ASP…

Oh so you could use ASP without the site having to be full of ASP.NET language? wow