How to Create a Simple Footer Using HTML and CSS

Learn how to make a simple footer with HTML and CSS, including fixed positioning and basic styling for your website’s bottom section.

1,599 views

To create a simple footer, add the following HTML to your webpage: `<footer><p>© 2023 Your Company Name. All rights reserved.</p></footer>`. To style the footer, use this CSS: `footer {background-color: #f1f1f1; text-align: center; padding: 10px 0; position: fixed; bottom: 0; width: 100%;}`. Adjust the content and styling based on your preferences.

FAQs & Answers

  1. What is the purpose of a footer in a webpage? A footer typically contains copyright information, links, or contact details and appears at the bottom of a webpage to provide consistent information across pages.
  2. How do I fix a footer at the bottom of the page using CSS? You can fix a footer at the bottom by using CSS properties like 'position: fixed;', 'bottom: 0;', and 'width: 100%;' to make it stay visible at the bottom regardless of scrolling.
  3. Can I customize the style of a simple HTML footer? Yes, using CSS you can customize background color, text alignment, padding, font styles, and positioning to match your website’s design.