A footer is a section of a webpage that appears at the bottom, usually containing information such as the author, copyright, contact details, sitemap, or related links. A footer can be created using the <footer> HTML element, which is part of the semantic HTML5 markup.
Semantic HTML elements are tags that have a meaning or purpose, rather than just being generic containers. They help to improve the accessibility, readability, and SEO of webpages. Some other examples of semantic HTML elements are <header>, <nav>, <article>, and <section>.
The <footer> element can be used to define a footer for a document or a section. It can contain any type of HTML content, such as text, images, lists, tables, or forms. However, it should not contain any <footer> or <header> descendants, or any <address> elements that are not related to the footer content.
The <footer> element is not sectioning content, meaning that it does not create a new section in the document outline. It also does not have a default style or layout, so it can be styled using CSS as desired.
Example of a Footer in HTML
Here is an example of how to create a simple footer for a webpage using HTML:
The footer contains some basic information about the author and the webpage, such as name, email address, and copyright notice. It also uses some CSS properties to style the footer, such as
text-align, padding, background-color, and color.
In this article, we learned what a footer is and how to use it in HTML. We saw that a footer is a semantic HTML element that defines a footer for a document or a section. We also saw how to create and style a simple footer using HTML and CSS.
If you want to learn more about HTML footers, you can check out these resources:
HTML footer Tag - W3Schools
<footer> - HTML: HyperText Markup Language MDN
How To Add a Footer To Your Webpage With HTML DigitalOcean ec8f644aee