I have a website that consists of 6 .html pages. The main page is (index.html), There are some <li>
elements in the navigation menu that import the content from another .html file, for example the contact us page.
When <li><a>Contact</a></li>
is clicked the navigation menu (header) and footer are remain without any change, just the content between them is changed with the content of "contact.html". It's working well if I visited the homepage then click "Contact" from the navigation menu, but what if I want to visit this page directly?
For example if I visit www.mywebsite.com/contact I find the header, contact page content and the footer. Because if I visit www.mywebsite.com/contact.html I will just find the html content without any styling or anything. So is this possible or I will need to add the header and footer code for all the pages?