Description
The HTML element <footer> is used to define a footer for an HTML document, which can include any of the below details.
- Copyright information
- Author information
- Contact Information
- Links to Sitemap, About, Privacy, Terms, and any other useful links.
The below table summarizes its usage.
| Usage Details | |
| Placement | It is displayed as a Block element. |
| Contents | It can contain Block elements, Inline elements, and text. It cannot include the <header> element and <footer> element. |
| Tags | Both opening and closing tags are required. |
| Versions | HTML5 |
Syntax
Here is the basic syntax of the <footer> element.
<footer>...</footer>
Examples
In the below example, the <footer> element is used to define the document footer.
<!DOCTYPE html>
<html lang="en">
<head>
<title>HTML Element - footer</title>
</head>
<body>
<footer>
<p><a href="/terms">Terms & Conditions</a> | <a href="/privacy">Privacy Policy</a></p>
<p>Copyright © Random Codez. All rights reserved.</p>
</footer>
</body>
</html>
Attributes
The following table shows the list of supported and unsupported attributes for the <footer> tag.
| Attribute Type | Details |
| Element-Specific Attributes | The tag <footer> doesn't have any element-specific attributes. |
| Global Attributes | Like all other HTML tags, the tag <footer> supports the HTML Global Attributes. |
| Event Attributes | The tag <footer> also supports the HTML Event Attributes. |
Browser Compatibility
The tag <footer> is supported in all modern browsers.
- Google Chrome 6+
- Internet Explorer or Edge 9+
- Firefox 4+
- Apple Safari 5.1+
- Opera 11.1+