Add Header and Footer In HTML Page

In HTML page add Header and footer Using Javascript.

  1. Create header file that is you want to add.
<div>
<h2 style="color:Red;" &gtHello Header&lt/h2>
</div>

2. Create footer file  that is you want to add.

<div>
<p>Copy @ CompnayName.com</p>
</div>

 

3. Now add your index.html file

<html>
<head>
<title></title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script> 
$(function(){
  $("#header").load("header.html"); 
  $("#footer").load("footer.html"); 
});
</script> 
</head>
<body>
<!--Header Section-->
<div id="header"></div>
<p>Description is the pattern of narrative development that presents a word picture of a thing, a person, a situation, or a series of events. Description is one of four rhetorical modes (also known as modes of discourse), along with exposition, argumentation, and narration</p>



<!--Remaining section-->
<div id="footer"></div>
</body>
</html>

Leave a Reply

Your email address will not be published. Required fields are marked *