/    Sign up×
Community /Pin to ProfileBookmark

novice’s question

Hi,
is there any way I can include certain portion of html in each of my html pages, using only html without using php or stuff like that. The matter is that I want all my pages to have the same footer but I dont’t want footer html code to be repeated in all my pages.

Thanx

alek_mil

to post a comment
HTML

10 Comments(s)

Copy linkTweet thisAlerts:
@FangFeb 15.2005 — Server-side is the best way, PHP SSI etc.

Alternatives:

iframe which loads a footer.html

JavaScript file containing the footer which is then written into the document

Both alternatives have drawbacks.
Copy linkTweet thisAlerts:
@the_treeFeb 15.2005 — If you don't want to use server side technologies then copy+paste is your best friend.
Copy linkTweet thisAlerts:
@TheBearMayFeb 15.2005 — Even without using server side languages you can use a server side include (may have to change the extension of the main file to shtml).

<!--#include file="Footer.html" -->

<!--#include virtual="../Footer.html" -->
Copy linkTweet thisAlerts:
@the_treeFeb 15.2005 — [i]Originally posted by TheBearMay [/i]

[B]Even without using server side languages you can use a server side include).[/B][/QUOTE]
Surely SSIs [i]are[/i] a server side language?
Copy linkTweet thisAlerts:
@TheBearMayFeb 15.2005 — Processing is done on the server true, but you don't need to learn an entire technology to use an include.
Copy linkTweet thisAlerts:
@the_treeFeb 16.2005 — You don't need to learn an entire language to do an include in PHP either.[code=php]<?php include('path/to/file.inc') ; ?>[/code]
Copy linkTweet thisAlerts:
@MstrBobFeb 16.2005 — [font=trebuchet ms][COLOR=royalblue]There are hosts that allow SSI but not a server side languages. Server side languages are, after all, more intense and much more powerful then SSI. The point being that SSI may be available even if Server Side Languages aren't. And I really wouldn't classify SSI as a programming language.[/COLOR][/font]
Copy linkTweet thisAlerts:
@CronusFeb 18.2005 — I'm not sure if you can, but you may be able to do it with CSS.

Not sure if that will help you at all...but it's worth a try!
Copy linkTweet thisAlerts:
@MstrBobFeb 18.2005 — [font=trebuchet ms][COLOR=royalblue]Browsers support remote linking to CSS information, but you can't remotely link to markup. Well, maybe if browsers properly supported entities. Charles has talked before about using entities to include external files, and I've fiddled around with it, but browser support is crap for it. Server side options are your best bet.[/COLOR][/font]
Copy linkTweet thisAlerts:
@IcyBlueEyesFeb 24.2005 — If you're not familiar with SSI or whether your service provider even handles them, there are really only 3 other options available to you:

(1) cutting and pasting your headers and footers, etc., into each webpage is very labor-intensive, especially if you have many pages and is very error-prone. Bad choice

(2) use frames -- most Web developers frown against using them. Also not a good choice.

(3) create Javascript files and write them to your webpage; here's how http://webdeveloper.earthweb.com/repository/javascripts/2003/06/195171/jsinc.html
×

Success!

Help @alek_mil spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...