HTML
Before we start writing code first, we need to create a primary structure of the HTML document, so that the browser can understand and start working. The basic HTML structure looks like the following.
After writing the primary structure of the HTML document, you will also write the tags and content you need. After that, you can see the output in your browser. We know that HTML Sudu Mae is used for exposing content in a basic format. To complete our content we need to use CSS, which is an HTML insert and it creates an engaging user interface.
<!DOCTYPE html>
<html>
<head>
<title>Fotter</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="container">
<div class="footer">
<div class="footer-heading footer-1">
<h2>About Us</h2>
<a href="#">Home</a>
<a href="#">Blog</a>
<a href="#">Customers</a>
<a href="#">Investors</a>
<a href="#">Demo</a>
</div>
<div class="footer-heading footer-2">
<h2>Contact Us</h2>
<a href="#">Jubs</a>
<a href="#">Support</a>
<a href="#">Contact</a>
<a href="#">Sponsorships</a>
</div>
<div class="footer-heading footer-3">
<h2>Socual Media</h2>
<a href="#">Instagram</a>
<a href="#">Facebook</a>
<a href="#">Youtube</a>
<a href="#">Twitter</a>
</div>
<div class="footer-email-form">
<h2>Join Our Newsletter</h2>
<input type="email" name="" placeholder="Enter Your Email Address" id="footer-email">
<input type="submit" name="" value="sing-up" id="footer-email-btn">
</div>
</div>
</div>
</body>
</html>
<html>
<head>
<title>Fotter</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div class="container">
<div class="footer">
<div class="footer-heading footer-1">
<h2>About Us</h2>
<a href="#">Home</a>
<a href="#">Blog</a>
<a href="#">Customers</a>
<a href="#">Investors</a>
<a href="#">Demo</a>
</div>
<div class="footer-heading footer-2">
<h2>Contact Us</h2>
<a href="#">Jubs</a>
<a href="#">Support</a>
<a href="#">Contact</a>
<a href="#">Sponsorships</a>
</div>
<div class="footer-heading footer-3">
<h2>Socual Media</h2>
<a href="#">Instagram</a>
<a href="#">Facebook</a>
<a href="#">Youtube</a>
<a href="#">Twitter</a>
</div>
<div class="footer-email-form">
<h2>Join Our Newsletter</h2>
<input type="email" name="" placeholder="Enter Your Email Address" id="footer-email">
<input type="submit" name="" value="sing-up" id="footer-email-btn">
</div>
</div>
</div>
</body>
</html>
CSS
Now, we have time to improve the HTML content, for that, we need to add CSS to the HTML file. CSS can be added to HTML documents in a total of three ways, here we are using outside CSS design using CSS will arrive here after typing and see the output in your browser.
*{
padding: 0;
margin: 0;
box-sizing: border-box;
font-family: sans-serif;
}
.container{
background-color: #212329;
padding: 4rem 0 4rem 0;
}
.footer{
width: 80%;
height: 40vh;
background-color: #212329;
color: white;
display: flex;
justify-content: center;
margin: 0 auto;
}
.footer-heading{
display: flex;
flex-direction: column;
margin-right: 4rem;
}
h2{
margin-bottom: 2rem;
}
a{
color: white;
text-decoration: none;
margin-bottom: 0.5rem;
}
a:hover{
color: red;
transition: 0.3s ease-out;
}
.footer-email-form{
margin-top: 30px;
font-size: 28px;
}
.footer-email-form h2{
margin-bottom: 2rem;
}
#footer-email{
width: 250px;
height: 40px;
border-radius: 5px;
outline: none;
border:none;
padding-left: 0.5rem;
font-size: 1rem;
margin-bottom: 1rem;
}
.footer-email-form::placeholder{
color: #b1b1b1;
}
#footer-email-btn{
width: 100px;
height: 40px;
border-radius: 5px;
background-color: red;
outline: none;
border:none;
color: white;
font-size: 1rem;
}
#footer-email-btn:hover{
cursor: pointer;
background-color: skyblue;
transition: all 0.4s ease-out;
}
padding: 0;
margin: 0;
box-sizing: border-box;
font-family: sans-serif;
}
.container{
background-color: #212329;
padding: 4rem 0 4rem 0;
}
.footer{
width: 80%;
height: 40vh;
background-color: #212329;
color: white;
display: flex;
justify-content: center;
margin: 0 auto;
}
.footer-heading{
display: flex;
flex-direction: column;
margin-right: 4rem;
}
h2{
margin-bottom: 2rem;
}
a{
color: white;
text-decoration: none;
margin-bottom: 0.5rem;
}
a:hover{
color: red;
transition: 0.3s ease-out;
}
.footer-email-form{
margin-top: 30px;
font-size: 28px;
}
.footer-email-form h2{
margin-bottom: 2rem;
}
#footer-email{
width: 250px;
height: 40px;
border-radius: 5px;
outline: none;
border:none;
padding-left: 0.5rem;
font-size: 1rem;
margin-bottom: 1rem;
}
.footer-email-form::placeholder{
color: #b1b1b1;
}
#footer-email-btn{
width: 100px;
height: 40px;
border-radius: 5px;
background-color: red;
outline: none;
border:none;
color: white;
font-size: 1rem;
}
#footer-email-btn:hover{
cursor: pointer;
background-color: skyblue;
transition: all 0.4s ease-out;
}
how to make a website footer using html and css
Reviewed by easycoding
on
August 29, 2020
Rating:
No comments: