a.html
ABC
b.html
<!--#include FILE="a.html" -->
XYZ
access b.html: file:///home/kurz/Desktop/b.html
it only shows XYZ
is this not the way to include files in html?
What you're attempting is called a Server-Side Include (SSI). As such, it requires the pages be running on a webserver, rather than a local file.
When you're requesting the page from a server, the server sees the <!--#include FILE="a.html" -->
preprocessor and performs the SSI.
When you're referencing it directly from your filesystem, such as file:///home/kurz/Desktop/b.html
, all your browser is doing is loading the raw html and interpreting that.
If it's apache try
<!--#include virtual="insertthisfile.html" -->
From here:
include virtual and include file do almost the same thing. The difference is that include virtual takes a URL-style path, which is what you probably expect. include virtual can also execute CGI programs, if your web server supports that, and include their output. include file takes a file-system path, and cannot execute CGI programs. Both also accept relative paths, so for a simple case like the above they work the same. If you don't understand the difference between web paths and file system paths, use include virtual.