However, I might have mentioned four additional ideas:
-
When trying something new, apply it just once and then have a look to ensure that it produces what's expected. Moving forward one step at a time avoids confusion.
The include() idea can fail for reasons as minor as forgetting to provide the semi-colon after the PHP include() statement. Flying blind is not necessary: Use the browser's source-code examination tool to view HTML that the server has sent.
Much HTML above the <body> tag should vary from one page to another in a particular site. So take care when applying the include() idea in this portion of the page. Study the meaning and use of the DTD (document type definition) and the meta tags. If a browser is unable (metaphorically) to understand the provided DTD, it may (metaphorically) throw up its hands and revert to "compatibility mode" without (metaphorically) uttering a complaint. "Compatibility mode" is a best-effort attempt to usefully render non-standard HTML. As such, "compatibility mode's" results are unpredictable and variable from one browser to another. It's a (metaphorical) jungle out there!
Various browsers may render the same HTML differently. Though the problem is lessening with time, older MS-Internet Explorer versions are notorious for working outside industry standards. Workarounds are documented on the Web.
Yes, I looked just like that in 1962.