I have a file, a.html, and a css file, a_style.css, that is linked to a's <head>
. I now want to include a second html file, b.html, which has its own style included in the <style>
tag. Specifically, b.html specifies the footer I want in a.html. My question is: The a_style.css file defines the headings, margins, etc. which also apply to b.html. If I include b.html in a.html, does a_style.css still apply to the included file? Further, the following is all I have to include b.html in a.html:
<div class="footer">
<?php include('./project/b.html');?>
</div>
Is this enough? Or do I need to include something in a's <head>
, similar to
<script type="text/javascript"
src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
(this particular code comes from MathJax)? I have no prior knowledge of php and found this snippet on a similar question: Insert one HTML file into another HTML file. This has not yet worked for me. I tried changing the extension to .php, but then the eclipse editor does not allow me to collapse/expand individual tags any longer, making the script very messy.
.php
instead of.html
? – Frédéric Bourdeau