FooterTutorials

How to create a complete footer in HTML

How to create a complete footer in HTML

Before We Start

Every developer needs clean and modern elements to develop their websites, It contains pictures and a user interface element within a website. The most important one and the first section that the user sees when the user enters a website. How to create a complete footer in HTML

So if you are a person who wishes to develop a website, you have to know how to create that properly.

how to create a SAMPLE

We are here to solve your problem. In this article we discuss how to create these elements. Before we start please read the below articles which easier you to understand the process, if you are new to development.

Step 1 – Add HTML

It’s too easy and simple. Just copy and paste below code in your HTML editor between <body> </body> tag.

<footer>
    <div class="contact">
      <h6>contact us</h6>
      <p class="one">Hi, we are always open for cooperation and suggestions,<br> contact us in one of the ways below</p>
      <div class="details">
        <div>
          <p>phone number</p>
          <span><a href="">+1 (800)060-07-30</a></span>
        </div> 
        <div> 
          <p>email address</p>
          <span><a href=""> us@example.com</a></span>
        </div>
        <div>
          <p>our location</p>
          <span>751 Fake Street,New York<br> 10021 USA</span>
        </div> 
        <div>
          <p>working hours</p>
          <span>Mon-Sat 10.00am-7.00pm</span>
        </div> 
      </div>  
    </div>
    <div class="information">
      <h6>information</h6>
      <p>about us</p>
      <p>delivery information</p>
      <p>privacy policy</p>
      <p>brands</p>
      <p>contact us</p>
      <p>returns</p>
      <p>site map</p>
    </div>
    <div class="account">
      <h6>my account</h6>
      <p>store location</p>
      <p>order history</p>
      <p>wish list</p>
      <p>newsletter</p>
      <p>special offers</p>
      <p>gift certificates</p>
      <p>affiliate</p>
    </div>
    <div class="newsletter">
      <h6>newsletter</h6>
      <p>enter your email address below to subscribe to our newsletter<br>
      and keep up to date with discounts and special offers</p>    
      <input type="email" name="email" placeholder="user@example.com">
      <button>Subscribe</button>
      <p>follow us on social networks</p>
      <a href=""><i class="fab fa-facebook-f"></i></a>
      <a href=""><i class="fab fa-twitter"></i></a>
      <a href=""><i class="fab fa-youtube"></i></a>
      <a href=""><i class="fab fa-instagram"></i></a>
      <a href=""><i class="fas fa-rss"></i></a>
    </div>
  </footer>
  <div class="footer-2">
    <p>Powered by <span>W3schoolweb</span></p>
    <div class="icons">
      <a href=""><i class="fab fa-cc-paypal" style="font-size:20px;"></i></a>
      <a href=""><i class="fab fa-cc-visa" style="font-size:20px;"></i></a>
      <a href=""><i class="fab fa-cc-amex" style="font-size:20px;"></i></a>
      <a href=""><i class="fab fa-cc-mastercard" style="font-size:20px;"></i></a>
      <a href=""><i class="fab fa-cc-mastercard" style="font-size:20px;"></i></a>
    </div>  
  </div>

Step 2 – Add CSS

Copy and paste below code in your HTML editor between <style></style> tag.

<style>
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: arial, tahoma;
  font-size: 9px;
  color: #fff;
  text-transform: capitalize;
}
footer {
  width: auto;
  background-color: #333;
  padding: 0 160px 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}
p {
  line-height: 180%;
  color: #a29e9e;
}
h6,
div {
  margin-bottom: 20px;
}
h6 {
  margin-top: 25px;
  font-size: 12px;
}
a {
  text-decoration: none;
  color: #fff;
}
footer div .one {
  margin-bottom: 20px;
  text-transform: none;
}
footer .details {
  display: flex;
  flex-wrap: wrap;
}
footer .details div {
  width: 150px;
  margin-right: 20px;
}
footer .details div p {
  text-transform: uppercase;
}
footer .details div span {
  margin-bottom: 20px;
}
footer .contact {
  width: 340px;
}
footer .information {
  margin-right: 20px;
}
footer .information p {
  margin-bottom: 8px;
}
footer .account p {
  margin-bottom: 8px;
  width: 150px;
}
footer .newsletter p,
input {
  padding: 5px;
}
footer .newsletter input {
  width: 170px;
  margin-bottom: 20px;
  border-style: none;
  background-color: #4d4d4d;
  color: #a29e9e;
}
footer .newsletter input::placeholder {
  color: #a29e9e;
  font-size: 10px;
}
footer .newsletter button {
  padding: 7px 12px;
  margin-left: 4px;
  color: #fff;
  background-color: #f00;
  font-size: 10px;
  border-style: none;
}
footer .newsletter a {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 5px;
  border-radius: 50%;
  text-align: center;
  line-height: 20px;
}
footer .newsletter a:first-of-type {
  background-color: #4267b2;
}
footer .newsletter a:nth-of-type(2) {
  background-color: #1da1f2;
}
footer .newsletter a:nth-of-type(3) {
  background-color: #f00;
}
footer .newsletter a:nth-of-type(4) {
  background-color: #8a50ca;
}

footer .newsletter a:last-of-type {
  background-color: #eeaa2f;
  color: #333;
}
a:hover {
  color: rgba(0, 0, 0, 0.3);
  transform: scale(1.3);
  transition: all 0.2s ease-in-out;
}
/* start media footer */
@media (max-width: 767px) {
  footer {
    padding: 15px 30px;
    justify-content: initial;
  }
  footer .information {
    width: 120px;
  }
  footer .account {
    width: 120px;
  }
}
/* end media footer */
.footer-2 {
  width: 100%;
  height: 45px;
  padding: 15px 180px;
  background-color: #252121;
  position: relative;
}
.footer-2 p {
  color: gray;
  display: inline-block;
  position: absolute;
  top: 15px;
}
.footer-2 p span {
  color: #fff;
}
.footer-2 .icons {
  float: right;
}
.footer-2 a {
  display: inline-block;
  margin-right: 4px;
}
.footer-2 a:first-of-type {
  background-color: #31abea;
  color: #fff;
}
.footer-2 a:nth-of-type(2) {
  background-color: #14226b;
  color: #fff;
}
.footer-2 a:nth-of-type(3) {
  background-color: #31abea;
  color: #fff;
}
.footer-2 a:nth-of-type(4) {
  background-color: orange;
  color: #fff;
}
.footer-2 a:last-of-type {
  background-color: #31abea;
  color: #fff;
}
/* start media footer-2 */
@media (max-width: 767px) {
  .footer-2 {
    padding: 5px 20px;
    height: 80px;
  }
  .footer-2 p {
    padding: 5px 15px;
    float: none;
    position: static;
  }
  .footer-2 .icons {
    padding: 5px 15px;
    float: none;
  }
}
/* end media footer-2 */

</style>

Step 3 – Add JavaScript

We use some external JavaScript link to this code. No need to worry about this, copy and paste below code between <head></head> tag.

<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.14.0/js/all.min.js"></script>">
</head>

At the end we will have something like this. You can change fonts, colors, backgrounds and all things that you want. Enjoy it.

Your Output

How to create a complete footer in HTML

Video Tutorial

Please watch this video to better understand this tutorial and don’t forget to subscribe to our channel.


Help others to find out about this article on Social Media sites. If you have any doubt or any problem, don’t hesitate to contact us. Thereafter we will be able to help you and also make sure you bookmark our site on your browser.

Related Articles

Leave a Reply

Your email address will not be published.

Back to top button