FooterTutorials

How to create a footer in html – part 1

How to create a footer in html - part 1

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 footer in html – part 1

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

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 class="flex-col">
      <div class="info-wrapper flex-row center bg-dark">
        <div class="wrapper">
          <div class="footer-info flex-row space-between-start ">
            <div class="info-container flex-row center">
              <ul>
                <li>
                  <h4> Menu </h4>
                </li>
                <li>
                  <a href="#"> Link</a>
                </li>
                <li>
                  <a href="#"> Link</a>
                </li>
                <li>
                  <a href="#"> Link</a>
                </li>
                <li>
                  <a href="#"> Link</a>
                </li>
              </ul>
            </div>
            <div class="info-container  flex-row center">
              <ul>
                <li>
                  <h4>Help</h4>
                </li>
                <li><a href="#"> FAQS </a> </li>
                <li><a href="#"> T & C's </a> </li>

              </ul>
            </div>
            <div class="info-container  flex-row center">
              <ul>
                <li>
                  <h4> Contact </h4>
                </li>
                <li> Address </li>
                <li> Telephone </li>
                <li> Email </li>

              </ul>
            </div>
          </div>
        </div>
      </div>
      <div class="social-links-container bg-light">
        <div class="wrapper flex-col center">
          <div class="social-links flex-row">
            <div class="social-link">
              <a href="#"> <i class="fab fa-facebook-f"></i></a>
            </div>
            <div class="social-link">
              <a href="#"><i class="fab fa-twitter"></i></a>
            </div>
            <div class="social-link">
              <a href="#"><i class="fab fa-youtube"></i></a>
            </div>

          </div>
          <div class="copyright-container">
            <p> Copyright &copy; 2020. All rights reserved</p>
          </div>
        </div>
      </div>
    </footer>

Step 2 – Add CSS

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

<head>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600&display=swap">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.12.1/css/all.min.css">
</head>

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

<style>
/* general styling */

* {
  box-sizing: border-box;
}

*:before,
*:after {
  box-sizing: border-box;
}

body {
  background-color: #80d0c7;
  font-family: "Source Sans Pro", sans-serif;
  min-height: 100vh;
}

ul li h4 {
  color: #80d0c7;
  font-weight: 600;
  margin-bottom: 2rem;
}

ul li {
  text-align: center;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

ul li:last-child {
  margin: 0;
}

a {
  text-decoration: none;
}

i {
  font-size: 18px;
}

/* utility */

.flex-row {
  display: flex;
  flex-direction: row;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.center {
  align-items: center;
  justify-content: center;
}

.space-between-start {
  align-items: flex-start;
  justify-content: space-between;
}

.bg-dark {
  background-color: #2a324b;
  color: #eff1f3;
}

.bg-dark a {
  color: #eff1f3;
}

a:hover {
  border-bottom: 2px solid #efa0e7;
}

.social-link a:hover {
  border-bottom: none;
  color: #efa0e7;
}

.bg-light {
  background-color: #eff1f3;
  color: #2a324b;
}

.bg-light {
  background-color: #eff1f3;
  color: #2a324b;
}

.bg-light a {
  color: #2a324b;
}

/* structure */

.wrapper {
  margin: 0 auto;
  width: 100%;
  max-width: 1200px;
}

/* footer */

footer {
  width: 100%;
  position: fixed;
  bottom: 0;
}

.info-wrapper {
  padding: 2rem 2rem;
}

.footer-info {
  width: 100%;
}

.info-container {
  flex-basis: 33.33%;
}

.social-links-container {
  padding: 1rem 2rem 2rem;
}

.social-links {
  margin-bottom: 1rem;
}

.social-link {
  margin: 0 1rem;
}

.copyright-container {
  text-align: center;
}

@media screen and (max-width: 565px) {
  .footer-info.flex-row {
    flex-direction: column;
  }
  .footer-info.space-between-start {
    align-items: center;
    justify-content: center;
  }
  .info-container {
    text-align: center;
    margin-bottom: 2rem;
  }
  .info-container:last-child {
    margin-bottom: 0;
  }
}

</style>

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 footer in html - part 1

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