Include HTML files into your web page

How to include HTML snippets in HTML.

In the past I have used PHP include to include things like menus and footers into my web pages. But there is another way to do it that does not require a PHP server.

http://www.w3schools.com/howto/howto_html_include.asp

<!DOCTYPE html>
<html>
<script src=”http://www.w3schools.com/lib/w3data.js”></script>

<body>

<div w3-include-html=”content.html”></div>

<script>
w3IncludeHTML();
</script>

</body>
</html>

Leave a Comment