1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
<header><h1><footer></h1></header><div class="section-content"><p>The <code><footer></code> <a href="../index">HTML</a> element represents a footer for its nearest ancestor <a href="../content_categories#sectioning_content">sectioning content</a> or <a href="heading_elements#sectioning_root">sectioning root</a> element. A <code><footer></code> typically contains information about the author of the section, copyright data or links to related documents.</p></div>
<h2 id="try_it">Try it</h2>
<div class="section-content">
<iframe class="interactive is-tabbed-standard-height" height="200" src="https://interactive-examples.mdn.mozilla.net/pages/tabbed/footer.html" title="MDN Web Docs Interactive Example" loading="lazy"></iframe> <figure class="table-container"><div class="_table"><table class="properties"> <tbody> <tr> <th scope="row"><a href="../content_categories">Content categories</a></th> <td>
<a href="../content_categories#flow_content">Flow content</a>, palpable content.</td> </tr> <tr> <th scope="row">Permitted content</th> <td> <a href="../content_categories#flow_content">Flow content</a>, but with no <code><footer></code> or <a href="header"><code><header></code></a> descendants. </td> </tr> <tr> <th scope="row">Tag omission</th> <td>None, both the starting and ending tag are mandatory.</td> </tr> <tr> <th scope="row">Permitted parents</th> <td> Any element that accepts <a href="../content_categories#flow_content">flow content</a>. Note that a <code><footer></code> element must not be a descendant of an <a href="address"><code><address></code></a>, <a href="header"><code><header></code></a> or another <code><footer></code> element. </td> </tr> <tr> <th scope="row">Implicit ARIA role</th> <td> <a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/contentinfo_role">contentinfo</a>, or <a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/generic_role">generic</a> if a descendant of an <a href="article">article</a>, <a href="aside">aside</a>, <a href="main">main</a>, <a href="nav">nav</a> or <a href="section">section</a> element, or an element with <code>role=<a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/article_role">article</a></code>, <a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/complementary_role">complementary</a>, <a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/main_role">main</a>, <a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/navigation_role">navigation</a> or <a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/region_role">region</a> </td> </tr> <tr> <th scope="row">Permitted ARIA roles</th> <td> <a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/group_role"><code>group</code></a>, <a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/presentation_role"><code>presentation</code></a> or <a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/none_role"><code>none</code></a> </td> </tr> <tr> <th scope="row">DOM interface</th> <td><a href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement"><code>HTMLElement</code></a></td> </tr> </tbody> </table></div></figure>
</div>
<h2 id="attributes">Attributes</h2>
<div class="section-content"><p>This element only includes the <a href="../global_attributes">global attributes</a>.</p></div>
<h2 id="usage_notes">Usage notes</h2>
<div class="section-content"><ul> <li>Enclose information about the author in an <a href="address"><code><address></code></a> element that can be included into the <code><footer></code> element.</li> <li>When the nearest ancestor sectioning content or sectioning root element is the body element the footer applies to the whole page.</li> <li>The <code><footer></code> element is not sectioning content and therefore doesn't introduce a new section in the <a href="heading_elements">outline</a>.</li> </ul></div>
<h2 id="examples">Examples</h2>
<div class="section-content">
<div class="code-example">
<p class="example-header"><span class="language-name">html</span></p>
<pre data-signature="XP1GJTeWpWI4jRvXabOj0QBznJRPl5tq2G0tFdw9HeI=" data-language="html"><span class="token tag"><span class="token tag"><span class="token punctuation"><</span>body</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>h3</span><span class="token punctuation">></span></span>FIFA World Cup top goalscorers<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>h3</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>ol</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>li</span><span class="token punctuation">></span></span>Miroslav Klose, 16<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>li</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>li</span><span class="token punctuation">></span></span>Ronaldo Nazário, 15<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>li</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>li</span><span class="token punctuation">></span></span>Gerd Müller, 14<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>li</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>ol</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>footer</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"><</span>small</span><span class="token punctuation">></span></span>
Copyright © 2023 Football History Archives. All Rights Reserved.
<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>small</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>footer</span><span class="token punctuation">></span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation"></</span>body</span><span class="token punctuation">></span></span>
</pre>
</div> <div class="code-example">
<p class="example-header"><span class="language-name">css</span></p>
<pre data-signature="u1v2fsaNt5NuCyxY6BzrznMfJ79vcEC6rW+QIAkFQPU=" data-language="css"><span class="token selector">footer</span> <span class="token punctuation">{</span>
<span class="token property">text-align</span><span class="token punctuation">:</span> center<span class="token punctuation">;</span>
<span class="token property">padding</span><span class="token punctuation">:</span> 5px<span class="token punctuation">;</span>
<span class="token property">background-color</span><span class="token punctuation">:</span> #abbaba<span class="token punctuation">;</span>
<span class="token property">color</span><span class="token punctuation">:</span> #000<span class="token punctuation">;</span>
<span class="token punctuation">}</span>
</pre>
</div>
<div class="code-example" id="sect1">
<iframe class="sample-code-frame" title="Examples sample" id="frame_examples" src="https://live.mdnplay.dev/en-US/docs/Web/HTML/Element/footer/runner.html?id=examples" loading="lazy"></iframe>
</div>
</div>
<h2 id="accessibility_concerns">Accessibility concerns</h2>
<div class="section-content">
<p>Prior to the release of Safari 13, the <code>contentinfo</code> <a href="https://developer.mozilla.org/en-US/docs/Learn/Accessibility/WAI-ARIA_basics#signpostslandmarks">landmark role</a> was not properly exposed by <a href="https://help.apple.com/voiceover/info/guide/" target="_blank">VoiceOver</a>. If needing to support legacy Safari browsers, add <code>role="contentinfo"</code> to the <code>footer</code> element to ensure the landmark will be properly exposed.</p> <ul> <li>Related: <a href="https://webkit.org/b/146930" target="_blank">WebKit Bugzilla: 146930 – AX: HTML native elements (header, footer, main, aside, nav) should work the same as ARIA landmarks, sometimes they don't</a>
</li> </ul>
</div>
<h2 id="specifications">Specifications</h2>
<div class="_table"><table class="standard-table">
<thead><tr><th scope="col">Specification</th></tr></thead>
<tbody><tr><td><a href="https://html.spec.whatwg.org/multipage/sections.html#the-footer-element">HTML Standard <br><small># the-footer-element</small></a></td></tr></tbody>
</table></div>
<h2 id="browser_compatibility">Browser compatibility</h2>
<div class="_table"><table>
<thead>
<tr id="bct-browser-type">
<th></th>
<th colspan="6">Desktop</th>
<th colspan="6">Mobile</th>
</tr>
<tr id="bct-browsers">
<th></th>
<th>Chrome</th>
<th>Edge</th>
<th>Firefox</th>
<th>Internet Explorer</th>
<th>Opera</th>
<th>Safari</th>
<th>WebView Android</th>
<th>Chrome Android</th>
<th>Firefox for Android</th>
<th>Opera Android</th>
<th>Safari on IOS</th>
<th>Samsung Internet</th>
</tr>
</thead>
<tbody><tr>
<th><code>footer</code></th>
<td class="bc-supports-yes">5</td>
<td class="bc-supports-yes">12</td>
<td class="bc-supports-yes">4</td>
<td class="bc-supports-yes">9</td>
<td class="bc-supports-yes">11.1</td>
<td class="bc-supports-yes">5</td>
<td class="bc-supports-yes">4.4</td>
<td class="bc-supports-yes">18</td>
<td class="bc-supports-yes">4</td>
<td class="bc-supports-yes">11.1</td>
<td class="bc-supports-yes">4.2</td>
<td class="bc-supports-yes">1.0</td>
</tr></tbody>
</table></div>
<h2 id="see_also">See also</h2>
<div class="section-content"><ul> <li>Other section-related elements: <a href="body"><code><body></code></a>, <a href="nav"><code><nav></code></a>, <a href="article"><code><article></code></a>, <a href="aside"><code><aside></code></a>, <a href="heading_elements">h1</a>, <a href="heading_elements">h2</a>, <a href="heading_elements">h3</a>, <a href="heading_elements">h4</a>, <a href="heading_elements">h5</a>, <a href="heading_elements">h6</a>, <a href="hgroup"><code><hgroup></code></a>, <a href="header"><code><header></code></a>, <a href="section"><code><section></code></a>, <a href="address"><code><address></code></a>;</li> <li><a href="heading_elements">Using HTML sections and outlines</a></li> <li><a href="https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/contentinfo_role">ARIA: Contentinfo role</a></li> </ul></div><div class="_attribution">
<p class="_attribution-p">
© 2005–2023 MDN contributors.<br>Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.<br>
<a href="https://developer.mozilla.org/en-US/docs/Web/HTML/Element/footer" class="_attribution-link">https://developer.mozilla.org/en-US/docs/Web/HTML/Element/footer</a>
</p>
</div>
|