How to make a footer html css

Create a stylish footer for your website with HTML & CSS: learn how with this easy example.

Creating a Footer with HTML and CSS

A footer is an important part of any website, as it typically contains information about the website and additional links or resources. Footers can also be used to provide copyright information, contact information, and other important information about the website. Creating a footer using HTML and CSS is a relatively simple process, and can be done in just a few steps.

The first step in creating a footer using HTML and CSS is to create a <div> element to contain the footer content. This can be done by adding the following code to the bottom of your HTML document:

<div id="footer">
</div>

This will create a <div> element with the ID of "footer". This is important, as it will allow us to style the footer using CSS later on.

Next, we need to add the actual content of the footer. This can be done by adding a few <p> elements inside the <div> element we created. For example, we can add the following code:

<div id="footer">
  <p>Copyright 2020</p>
  <p>Contact Us</p>
  <p>Privacy Policy</p>
</div>

This will create a footer with three paragraphs, each containing a different piece of information.

Finally, we need to add some styling to the footer using CSS. This can be done by adding the following code to the bottom of our CSS file:

#footer {
  background-color: #333;
  padding: 20px;
}

#footer p {
  font-size: 14px;
  color: #fff;
  margin: 0;
}

This will set the background color of the footer to a dark gray, and set the font size and color of the footer text to white. It will also add some padding to the footer, to make it look neater.

And that's it! You now have a simple footer with HTML and CSS. You can add more content to the footer, or style it further, as needed.

Answers (0)