**include.js** A Cross-browser, Cross-domain HTML Include Tag This library adds a browser-based include statement for HTML. To use it: 1. Put `<script` `src="https://morgan3d.github.io/include.js/include.min.js"></script>` in both the parent and child documents 2. Use `<include` `src="child.html"></include>` wherever you want to include another document ______________________________________________________________________________________________ Features: - Included HTML is truly inlined, not inside another element - Works recursively - Works with multiple inclusions of the same source - Handles relative URLs in other tags - Supports CSS - Works for purely-static sites - Works for local files and across domains - Secure: both the parent and child document must opt-in with a script tag - Only 1005 bytes! Limitations: - Doesn't bother checking for infinite recursion (just don't do that!) - Relative URLs within _inline_ style tags/attributes and Javascript will break if files are in different directories Alternatives: - [HTML imports](http://w3c.github.io/webcomponents/spec/imports/) (CORS cross-domain and local Chrome problems, [doesn't work](http://caniuse.com/#feat=imports) on IE, Edge, or Firefox) - [PHP server-side inclusion](http://php.net/manual/en/function.include.php) (requires a nonstatic server, breaks relative URLs) - [iframes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe) (break document flow and styling) - [XMLHttpRequest](https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest) tricks, such as [w3data.js](http://www.w3schools.com/howto/howto_html_include.asp) (CORS cross-domain and local Chrome problems) - script tags with a lot of document.write calls (ugly) Copyright 2016, Morgan McGuire [@CasualEffects](https://twitter.com/CasualEffects), http://casual-effects.com

[MIT License](https://opensource.org/licenses/MIT)