Skip to content

Instantly share code, notes, and snippets.

@sarvar
Created April 17, 2019 11:11
Show Gist options
  • Save sarvar/b9c50c80dd776ca754844875fd7dcced to your computer and use it in GitHub Desktop.
Save sarvar/b9c50c80dd776ca754844875fd7dcced to your computer and use it in GitHub Desktop.
Make header and footer files to be included in multiple html pages
<html>
<head>
<title></title>
<script
src="https://code.jquery.com/jquery-3.3.1.js"
integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60="
crossorigin="anonymous">
</script>
<script>
$(function(){
$("#header").load("header.html");
$("#footer").load("footer.html");
});
</script>
</head>
<body>
<div id="header"></div>
<!--Remaining section-->
<div id="footer"></div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment