Importing an external file into an HTML File
Is there a way to import a section of HTML/JS/CSS code (not fully marked up
HTML file) at a given point in an HTML file? In otherwords, same function
as external .js file, but for a section only of HTML/JS/CSS code?
Try this:
<!-- #include "myfile.inc" -->
In the include file just put all the css or whatever you want. You can
try a different extension for the file, but try inc first as it is
pretty standard. And be sure that the file is made executable, either
by "chomd'ing" it to 755, or by setting the directory up within the
Web server admin console (if you're using a Windows-based Web server).
|