Using the include directive Last updated: 06. Dec 2016

Use the INCLUDE ERROR, FILE NOT FOUND: include ... directive to include other files into your page. Includes run before scripts in your page.

For example create a "menu.html" in your site

    <li><a href="/Home">Home</a></li>
    <li><a href="/Products">About us</a></li>
    <li><a href="/Products">Products</a></li>
    <li><a href="/Services">Services</a></li>
    <li><a href="/Contact">Contact us</a></li>

Now you can use the include directive to include it in another page

<!DOCTYPE html>
        <title>Test page</title>
        <meta charset="UTF-8"/>
            <!--#include file="Menu.html" -->
            <h1>About us</h1>
            <p>This is a test page that includes a menu from another file using the include directive.</p>