Jump to content

Includes within HTML files?

Donny Bahama

Recommended Posts

It occurs to me that it might be a good idea to have the pages on my site be modular... Is there some way I can just include (like I would in php) a file for my banner, navigation, footer, etc. I'm currently going through and editing every file on my site - all because I decided to make a change to my nav menu. If I have to go with php pages instead, I can do that, but I thought I'd check first.

If there is a way to do this, is it well-supported by all browsers (even old ones/IE/etc.)? If I have to go with php pages, are there SEO issues/complications to doing so? I would assume they would only look at the rendered pages, right?

Link to comment
Share on other sites

Did you use the code exactly as it is presented on the W3Schools website?

There are a couple of issues you may encounter:

  1. If you're running the HTML file from your computer's file system, browser security restrictions will prevent the other files from loading.
  2. Files from other websites are prevented from loading by browsers unless the other website specifically allows your domain name to use the files.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...