title: How to add the same header and footer to all pages at once? HTML
body: <p>I'm trying to figure out how to upload the same header and footer from my index to all pages, without having to edit all of them after that if I change/add something to the header and footer.
  I'm using CSS and JS to my HTML pages.
  you can <a href="http://damontanha.com.br/home.html" rel="nofollow noreferrer">check the main page here</a>.</p>
  
  <p>If it helps, those are the following codes:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;html&gt;
  &lt;head&gt;
  &lt;meta charset="utf-8"&gt;
  &lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&gt;
  &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
  &lt;title&gt;Da Montanha | Esporte e Aventura em Curitiba&lt;/title&gt;
  &lt;!--[if lt IE 9]&gt;
        &lt;script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"&gt;&lt;/script&gt;
        &lt;script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"&gt;&lt;/script&gt;
      &lt;![endif]--&gt;
      
  &lt;link href="css/custom.css" rel="stylesheet" type="text/css"&gt;
   
  &lt;link href="css/bootstrap.css" rel="stylesheet" type="text/css"&gt;
   
  &lt;link href="css/color.css" rel="stylesheet" type="text/css"&gt;
   
  &lt;link href="css/responsive.css" rel="stylesheet" type="text/css"&gt;
   
  &lt;link href="css/owl.carousel.css" rel="stylesheet" type="text/css"&gt;
   
  &lt;link href="css/font-awesome.min.css" rel="stylesheet" type="text/css"&gt;
   
  &lt;link href="css/datepicker.css" rel="stylesheet" type="text/css"&gt;
   
  &lt;link href="css/iconmoon.css" rel="stylesheet" type="text/css"&gt;
   
  &lt;link rel="icon" href="images/favicon.ico" type="image/x-icon"&gt;
   
  &lt;link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css"&gt;
  &lt;link href="https://fonts.googleapis.com/css?family=Open+Sans:400,400italic,700,600" rel="stylesheet" type="text/css"&gt;
  &lt;/head&gt;
  &lt;body class="campers-theme"&gt;
   
  &lt;div id="wrapper"&gt;
   
  &lt;header id="header"&gt;
   
  &lt;section class="topbar-section"&gt;
  &lt;div class="container"&gt;
  &lt;div class="col-md-6"&gt;
  &lt;div class="top-social"&gt;
  &lt;ul&gt;
  &lt;li&gt;&lt;a href="https://instagram.com/DaMontanhaAventura" target="_blank"&gt;&lt;i class="fa fa-instagram" target="_blank"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="https://www.youtube.com/channel/UC2xNehgiy7AJzThAxQJqA3A" target="_blank"&gt;&lt;i class="fa fa-youtube-square" target="_blank"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="https://facebook.com/DaMontanhaAventura" target="_blank"&gt;&lt;i class="fa fa-facebook-f" target="_blank"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  &lt;a href="mailto:contato@damontanha.com.br" class="email"&gt;&lt;i class="fa fa-envelope-o"&gt;&lt;/i&gt;&lt;span class="__cf_email__" data-cfemail=""&gt;contato@damontanha.com.br&lt;/span&gt;&lt;/a&gt; &lt;script data-cfhash="f9e31" type="text/javascript"&gt;/* &lt;![CDATA[ */!function(t,e,r,n,c,a,p){try{t=document.currentScript||function(){for(t=document.getElementsByTagName('script'),e=t.length;e--;)if(t[e].getAttribute('data-cfhash'))return t[e]}();if(t&amp;&amp;(c=t.previousSibling)){p=t.parentNode;if(a=c.getAttribute('data-cfemail')){for(e='',r='0x'+a.substr(0,2)|0,n=2;a.length-n;n+=2)e+='%'+('0'+('0x'+a.substr(n,2)^r).toString(16)).slice(-2);p.replaceChild(document.createTextNode(decodeURIComponent(e)),c)}p.removeChild(t)}}catch(u){}}()/* ]]&gt; */&lt;/script&gt;&lt;/a&gt; &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="col-md-6"&gt;
  &lt;div class="register-login"&gt;
  &lt;ul&gt;
  &lt;li&gt;&lt;a href="login.html"&gt;&lt;i class="fa fa-key"&gt;&lt;/i&gt;Login&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="registrar-se.html"&gt;&lt;i class="fa fa-unlock"&gt;&lt;/i&gt;Registrar-se&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/section&gt;
   
   
  &lt;section class="logo-section"&gt;
  &lt;div class="container"&gt;
  &lt;div class="col-md-6"&gt;&lt;strong class="logo"&gt;&lt;a href="index.html"&gt;&lt;img src="images/logo.png" alt="logo"&gt;&lt;/a&gt;&lt;/strong&gt;&lt;/div&gt;
  &lt;div class="col-md-6"&gt;
  &lt;div class="book-section"&gt; &lt;a href="booking-form.html" class="btn-book"&gt;Orçamentos&lt;/a&gt;
  &lt;div class="number-box"&gt; &lt;i class="fa fa-whatsapp"&gt;&lt;/i&gt;
  &lt;div class="number-text"&gt; &lt;span&gt;Entre em Contato&lt;/span&gt; &lt;strong&gt;41 99613 6600&lt;/strong&gt; &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/section&gt;
   
  &lt;div id="cp-slide-search" class="cp_side-search"&gt;
  &lt;form method="get"&gt;
  &lt;input type="text" placeholder="Digite o que procura..." required&gt;
  &lt;button type="submit"&gt;&lt;i class="fa fa-search"&gt;&lt;/i&gt;&lt;/button&gt;
  &lt;/form&gt;
  &lt;/div&gt;
   
  &lt;section class="main-navigation"&gt;
  &lt;nav class="navbar navbar-inverse"&gt;
  &lt;div class="container"&gt;
  &lt;div class="col-md-12"&gt;
  &lt;div class="navbar-header"&gt;
  &lt;button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"&gt; &lt;span class="sr-only"&gt;Toggle navigation&lt;/span&gt; &lt;span class="icon-bar"&gt;&lt;/span&gt; &lt;span class="icon-bar"&gt;&lt;/span&gt; &lt;span class="icon-bar"&gt;&lt;/span&gt; &lt;/button&gt;
  &lt;/div&gt;
  &lt;div class="nav-outer"&gt;
  &lt;div id="navbar" class="collapse navbar-collapse"&gt;
  &lt;ul class="nav navbar-nav" id="nav"&gt;
  &lt;li class="active"&gt;&lt;a href="#"&gt;Início&lt;/a&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;a href="Aventuras.html"&gt;Aventuras&lt;i class="fa fa-caret-down"&gt;&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="events-large.html"&gt;Eventos&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="products.html"&gt;Loja&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="#"&gt;Páginas&lt;i class="fa fa-caret-down"&gt;&lt;/i&gt;&lt;/a&gt;
  &lt;ul&gt;
  &lt;li&gt;&lt;a href="blog-large.html"&gt;Blog&lt;/i&gt;&lt;/a&gt;&lt;/li&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="booking-form.html"&gt;Orçamento&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="team.html"&gt;Nosso Time&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="gallery-1.html"&gt;Galeria de fotos&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="testimonials.html"&gt;Depoimentos&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  &lt;/li&gt;
  &lt;li&gt;&lt;a href="about.html"&gt;Sobre Nós&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="contact.html"&gt;Contato&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  &lt;/div&gt;
  &lt;div class="nav-right-col"&gt;
  &lt;div class="cart-box-outer"&gt;
  &lt;div class="dropdown"&gt;
  &lt;button class="dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"&gt; &lt;i class="fa fa-shopping-cart"&gt;&lt;/i&gt; &lt;/button&gt;
  &lt;ul class="dropdown-menu" aria-labelledby="dropdownMenu1"&gt;
  &lt;li&gt;
  &lt;div class="cart-box"&gt; &lt;strong class="title"&gt;Você tem &lt;a href="products-detail.html"&gt;1 item(s)&lt;/a&gt; no seu carrinho.&lt;/strong&gt;
  &lt;div class="cart-row"&gt;
  &lt;div class="thumb"&gt;&lt;a href="products-detail.html"&gt;&lt;img alt="img" src="images/cart-img.jpg"&gt;&lt;/a&gt;&lt;/div&gt;
  &lt;div class="text-box"&gt; &lt;a class="close" href="#"&gt;&lt;i class="fa fa-close"&gt;&lt;/i&gt;&lt;/a&gt; &lt;a href="products-detail.html"&gt;BestWedding Camping Equipment&lt;/a&gt; &lt;strong class="amount"&gt;1 x R$59.00&lt;/strong&gt; &lt;/div&gt;
  &lt;/div&gt;
  &lt;strong class="subtotal"&gt;Subtotal: &lt;span&gt;R$59.00&lt;/span&gt;&lt;/strong&gt;
  &lt;div class="btn-row"&gt; &lt;a class="btn-checkout" href="products-detail.html"&gt;Checkout&lt;/a&gt; &lt;/div&gt;
  &lt;/div&gt;
  &lt;/li&gt;
  &lt;/ul&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="top-search"&gt; &lt;a href="#" class="search-icon" id="search-push"&gt;&lt;i class="fa fa-search"&gt;&lt;/i&gt;&lt;/a&gt; &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/nav&gt;
  &lt;/section&gt;
   
  &lt;/header&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;footer id="footer"&gt;
  &lt;section class="instagram"&gt;
  &lt;div class="container"&gt;
  &lt;h2&gt;We’re on Instagram&lt;/h2&gt;
  &lt;/div&gt;
  &lt;ul&gt;
  &lt;li&gt;&lt;a href="#"&gt;&lt;img src="images/instagram/instagram-img-1.jpg" alt="img"&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="#"&gt;&lt;img src="images/instagram/instagram-img-2.jpg" alt="img"&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="#"&gt;&lt;img src="images/instagram/instagram-img-3.jpg" alt="img"&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="#"&gt;&lt;img src="images/instagram/instagram-img-4.jpg" alt="img"&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="#"&gt;&lt;img src="images/instagram/instagram-img-5.jpg" alt="img"&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="#"&gt;&lt;img src="images/instagram/instagram-img-6.jpg" alt="img"&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="#"&gt;&lt;img src="images/instagram/instagram-img-7.jpg" alt="img"&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="#"&gt;&lt;img src="images/instagram/instagram-img-8.jpg" alt="img"&gt;&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  &lt;/section&gt;
   
  &lt;section class="footer-section-1"&gt;
  &lt;div class="container"&gt;
  &lt;div class="row"&gt;
  &lt;div class="col-md-4"&gt; &lt;strong class="footer-logo"&gt;&lt;a href="#"&gt;&lt;img src="images/footer-logo.png" alt="logo"&gt;&lt;/a&gt;&lt;/strong&gt;
  &lt;p&gt;Lorem ipsum dolor sit amet, consectetur adipis elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullam laboris nisi ut aliquip ex ea commodo conseque Duis aute irure dolor in reprehenderit&lt;/p&gt;
  &lt;a href="about.html" class="btn-style-2"&gt;Read More&lt;/a&gt; &lt;/div&gt;
  &lt;div class="col-md-4"&gt;
  &lt;h3&gt;More Services&lt;/h3&gt;
  &lt;div class="row"&gt;
  &lt;div class="col-md-6"&gt;
  &lt;div class="footer-box"&gt;
  &lt;ul&gt;
  &lt;li&gt;&lt;a href="#"&gt;Free Parking&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="#"&gt;Free Wifi Area&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="#"&gt;Restaurant&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="#"&gt;Free Hot Shower&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="#"&gt;Swimming Pool&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="#"&gt;Shaded Pitches&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="col-md-6"&gt;
  &lt;div class="footer-box"&gt;
  &lt;ul&gt;
  &lt;li&gt;&lt;a href="#"&gt;Laundry&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="#"&gt;Hairdresser&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="#"&gt;Digs Area&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="#"&gt;Barbecue Station&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="#"&gt;Ping Pong Table&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="#"&gt;Coffee Bar&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="col-md-4"&gt;
  &lt;div class="footer-box"&gt;
  &lt;h3&gt;Contact us&lt;/h3&gt;
  &lt;address&gt;
  &lt;ul&gt;
  &lt;li&gt; &lt;span&gt;&lt;i class="fa fa-home"&gt;&lt;/i&gt;&lt;/span&gt;
  &lt;div class="text-box"&gt;
  &lt;p&gt;123 Lorem Ipsum Avenue,&lt;br&gt;
  Campers Road, NY, U.S.A.&lt;/p&gt;
  &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt; &lt;span&gt;&lt;i class="fa fa-phone"&gt;&lt;/i&gt;&lt;/span&gt;
  &lt;div class="text-box"&gt;
  &lt;p&gt;Call us for any Query&lt;/p&gt;
  &lt;strong&gt;44 01234 5678&lt;/strong&gt; &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt; &lt;span&gt;&lt;i class="fa fa-envelope-o"&gt;&lt;/i&gt;&lt;/span&gt;
  &lt;div class="text-box"&gt;
  &lt;p&gt;Send us email for any Information&lt;/p&gt;
  &lt;a href="mailto:"&gt;&lt;span class="__cf_email__" data-cfemail="caa3a4aca58aa9aba7baafb8b9e4a9a5a7"&gt;[email&amp;#160;protected]&lt;/span&gt;&lt;script data-cfhash='f9e31' type="text/javascript"&gt;/* &lt;![CDATA[ */!function(t,e,r,n,c,a,p){try{t=document.currentScript||function(){for(t=document.getElementsByTagName('script'),e=t.length;e--;)if(t[e].getAttribute('data-cfhash'))return t[e]}();if(t&amp;&amp;(c=t.previousSibling)){p=t.parentNode;if(a=c.getAttribute('data-cfemail')){for(e='',r='0x'+a.substr(0,2)|0,n=2;a.length-n;n+=2)e+='%'+('0'+('0x'+a.substr(n,2)^r).toString(16)).slice(-2);p.replaceChild(document.createTextNode(decodeURIComponent(e)),c)}p.removeChild(t)}}catch(u){}}()/* ]]&gt; */&lt;/script&gt;&lt;/a&gt; &lt;/div&gt;
  &lt;/li&gt;
  &lt;li&gt; &lt;span&gt;&lt;i class="fa fa-clock-o"&gt;&lt;/i&gt;&lt;/span&gt;
  &lt;div class="text-box"&gt;
  &lt;p&gt;Office Timings&lt;/p&gt;
  &lt;strong&gt;09:00 - 19:00&lt;/strong&gt; &lt;/div&gt;
  &lt;/li&gt;
  &lt;/ul&gt;
  &lt;/address&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/section&gt;
   
   
  &lt;section class="footer-section-2"&gt;
  &lt;div class="container"&gt;
  &lt;div class="row"&gt;
  &lt;div class="col-md-6"&gt;
  &lt;div class="footer-socila"&gt;
  &lt;ul&gt;
  &lt;li&gt;&lt;a href="#"&gt;&lt;i class="fa fa-twitter"&gt;&lt;/i&gt;twitter&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="#"&gt;&lt;i class="fa fa-facebook-f"&gt;&lt;/i&gt;facebook&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="#"&gt;&lt;i class="fa fa-google-plus"&gt;&lt;/i&gt;google plus&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;&lt;a href="#"&gt;&lt;i class="fa fa-linkedin-square"&gt;&lt;/i&gt;linkedin&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="col-md-6"&gt;&lt;strong class="copy"&gt;2016 &amp;copy; Campers, Powered by: &lt;a href="http://crunchpress.com/" target="_blank"&gt;Crunchpress&lt;/a&gt;&lt;/strong&gt;&lt;/div&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  &lt;/section&gt;
   
  &lt;/footer&gt;
   
  &lt;/div&gt;
   
   
  &lt;script src="js/jquery-1.12.2.min.js"&gt;&lt;/script&gt;
   
  &lt;script src="js/bootstrap.min.js"&gt;&lt;/script&gt;
   
  &lt;script src="js/owl.carousel.min.js"&gt;&lt;/script&gt;
   
  &lt;script src="js/jquery.noconflict.js"&gt;&lt;/script&gt;
  &lt;script src="js/theme-scripts.js"&gt;&lt;/script&gt;
   
  &lt;script src="js/zebra_datepicker.js"&gt;&lt;/script&gt;
   
  &lt;script src="js/function.js"&gt;&lt;/script&gt;
   
  &lt;script src="../../cdnjs.cloudflare.com/ajax/libs/waypoints/2.0.3/waypoints.min.js"&gt;&lt;/script&gt;
  &lt;script src="js/jquery.counterup.min.js"&gt;&lt;/script&gt;
   
  &lt;script src="js/jquery.countdown.min.js"&gt;&lt;/script&gt;
   
  &lt;script src="js/custom.js"&gt;&lt;/script&gt;
  &lt;script type="text/javascript"&gt;/* &lt;![CDATA[ */(function(d,s,a,i,j,r,l,m,t){try{l=d.getElementsByTagName('a');t=d.createElement('textarea');for(i=0;l.length-i;i++){try{a=l[i].href;s=a.indexOf('/cdn-cgi/l/email-protection');m=a.length;if(a&amp;&amp;s&gt;-1&amp;&amp;m&gt;28){j=28+s;s='';if(j&lt;m){r='0x'+a.substr(j,2)|0;for(j+=2;j&lt;m&amp;&amp;a.charAt(j)!='X';j+=2)s+='%'+('0'+('0x'+a.substr(j,2)^r).toString(16)).slice(-2);j++;s=decodeURIComponent(s)+a.substr(j,m-j)}t.innerHTML=s.replace(/&lt;/g,'&amp;lt;').replace(/&gt;/g,'&amp;gt;');l[i].href='mailto:'+t.value}}catch(e){}}}catch(e){}})(document);/* ]]&gt; */&lt;/script&gt;&lt;/body&gt;
  
  &lt;!-- Mirrored from html.crunchpress.com/campers/blog-details.html by HTTrack Website Copier/3.x [XR&amp;CO'2014], Thu, 24 Nov 2016 12:21:10 GMT --&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>