I'd strongly recommend using PHP:
<?php include "header.html"; ?>
This works on both Linux & Windows, and both Apache & IIS.
However, if that is not an option, you can use Server Side Includes:
File in the same dir:
<!--#include file="header.html"-->
File in a different dir:
<!--#include virtual="/header.html"-->
You'll need an Apache (not IIS) server for this to work. You'll also need to use the .shtml
file extension.
Alternatively, given that you want to keep .html
extensions, you can make Apache "think" that all .html
files are actually .php
:
Create a .htaccess file at the root of your website and add this line:
AddType application/x-httpd-php .html .htm
If your are running PHP as CGI (probably not the case), you should write instead:
AddHandler application/x-httpd-php .html .htm
(Taken from this answer)