HTML <footer> tagS2C Home   « HTML <footer> tag

Definition

The <footer> tag is used to define a footer for a HTML document or section.

The <footer> element should contain information such as copyright, sitemaps, contact information, terms of usage etc.

A document or section can have more than one <footer> tag.

If supplying contact information in the <footer> tag use the <address> HTML tag for this purpose.

The <footer> tag was introduced in HTML5.

Example


<header style="background-color:cyan">
  <h2>Some heading</h2>
  <p>Header content</p>
</header>
<main style="background-color:yellow">
  <h2>Main content heading</h2>
  <p>Main content</p>
</main>
<footer style="background-color:orange">
  <h2>Footer Content heading</h2>
  <p>Footer Content such as copyright, sitemaps, contact information</p>
</footer>

Some heading

Header content

Main content heading

Main content

Footer Content heading

Footer Content such as copyright, sitemaps, contact information

Attributes

The following attributes can be used with the <footer> tag.


<footer> Specific Attributes
Attribute Value Description Example
There are no required or optional attributes specific to the <footer> tag.
<footer> Global Attributes
Attribute Description Example
Common
classSpecifies a classname for the element allowing you to apply the style of the predefined class to the content.

<footer class="name">Footer Content</footer>
idSpecifies a unique id for the element allowing you to apply the style of the predefined id to the content.

<footer id="name">Footer Content</footer>
styleSpecifies an inline style for the element allowing you to apply the style to the contentt.

<footer style="color:red;">Footer Content</footer>
titleSpecifies an inline style for the element allowing you to apply the style to the content.

<footer title="Content info">Footer Content</footer>
Keyboard
accesskeySpecifies a keyboard shortcut to associate with the element.

<footer accesskey="a">Footer Content</footer>
tabindexSpecifies a tab order for the element.

<footer tabindex="1">Footer Content</footer>
Language
dirSpecifies the directional flow of the content.

<!-- The text will flow from left to right -->
<footer dir="ltr">Footer Content</footer>
<!-- The text will flow from right to left -->
<footer dir="rtl">Footer Content</footer>
langSpecifies a language code for the content of the element.

<footer lang="en">Footer Content</footer>
spellcheckSpecifies an inline style for the element allowing you to apply the style to the contentt.

<!-- Valid values true and false. -->
<!-- Default inherited / browser specific. -->
<footer spellcheck="true">Footer Content</footer> 
translateSpecifies an inline style for the element allowing you to apply the style to the content.

<!-- Valid values yes and no. -->
<!-- Default yes. -->
<footer translate="no">Footer Content</footer> 
Miscellaneous
contenteditableSpecifies whether the content of the element is editable.

<!-- Valid values true and false. -->
<!-- Default inherited. -->
<footer contenteditable="true">Footer Content</footer> 
draggableSpecifies whether the element is draggable.

<!-- Valid values true and false. -->
<!-- Default browser specific. -->
<footer draggable="true">Footer Content</footer>
hiddenSpecifies whether the element is not yet, or no longer, relevant.

<!-- Valid values an empty string or hidden -->
<footer hidden>Footer Content</footer> 
<footer hidden="hidden">Footer Content</footer> 
<footer> Event Attributes
Attribute Description Example
Document Element
oncopyThe script to be run when the user copies the content of an element.

 <!-- Executes go() function -->
<footer oncopy="go()">Footer Content</footer> 
oncutThe script to be run when the user cuts the content of an element.

 <!-- Executes go() function -->
<footer oncut="go()">Footer Content</footer>
onpasteThe script to be run when the user pastes some content into an element.

 <!-- Executes go() function -->
<footer onpaste="go()">Footer Content</footer>
Drag and Drop
ondragThe script to be run when an element is dragged.

 <!-- Executes go() function -->
<footer ondrag="go()">Footer Content</footer>
ondragendThe script to be run when an element has stopped being dragged.

 <!-- Executes go() function -->
<footer ondragend="go()">Footer Content</footer>
ondragenterThe script to be run when an element has been dragged to a valid drop target.

 <!-- Executes go() function -->
<footer ondragenter="go()">Footer Content</footer>
ondragleaveThe script to be run when an element leaves a valid drop target.

 <!-- Executes go() function -->
<footer ondragleave="go()">Footer Content</footer>
ondragoverThe script to be run when an element is being dragged over a valid drop target.

 <!-- Executes go() function -->
<footer ondragover="go()">Footer Content</footer>
ondragstartThe script to be run at the start of a drag operation.

 <!-- Executes go() function -->
<footer ondragstart="go()">Footer Content</footer>
ondropThe script to be run when a dragged element is being dropped.

 <!-- Executes go() function -->
<footer ondrop="go()">Footer Content</footer>
Form
onblurThe script to be run when the element loses focus.

 <!-- Executes go() function -->
<footer onblur="go()">Footer Content</footer>
onchangeThe script to be run when object changed and attempt to leave field.

 <!-- Executes go() function -->
<footer onchange="go()">Footer Content</footer>
oncontextmenuThe script to be run when a context menu is triggered.

 <!-- Executes go() function -->
<footer oncontextmenu="go()">Footer Content</footer>
onfocusThe script to be run when the element gets focus.

 <!-- Executes go() function -->
<footer onfocus="go()">Footer Content</footer>
oninputThe script to be run when an element gets user input.

 <!-- Executes go() function -->
<footer oninput="go()">Footer Content</footer>
oninvalidThe script to be run when an element is invalid.

 <!-- Executes go() function -->
<footer oninvalid="go()">Footer Content</footer>
onresetThe script to be run when a dragged element is being dropped.

 <!-- Executes go() function -->
<footer onreset="go()">Footer Content</footer>
onselectThe script to be run when some or all of the contents of an object are selected.

 <!-- Executes go() function -->
<footer onselect="go()">Footer Content</footer>
onsubmitThe script to be run when a form is submitted.

 <!-- Executes go() function -->
<footer onsubmit="go()">Footer Content</footer>
Keyboard
onkeydownThe script to be run when an element is in focus and keyboard key is pressed down.

 <!-- Executes go() function -->
<footer onkeydown="go()">Footer Content</footer>
onkeypressThe script to be run when an element is in focus and keyboard key is pressed down and released.

 <!-- Executes go() function -->
<footer onkeypress="go()">Footer Content</footer>
onkeyupThe script to be run when an element is in focus and keyboard key is released.

 <!-- Executes go() function -->
<footer onkeyup="go()">Footer Content</footer>
Media
onabortThe script code to be run on abort.

 <!-- Executes go() function -->
<footer onabort="go()">Footer Content</footer>
oncanplayThe script to be run when a file has buffered enough so it is ready to start playing.

 <!-- Executes go() function -->
<footer oncanplay="go()">Footer Content</footer>
oncanplaythroughThe script to be run when a file can be played all the way to the end without further need of buffering.

 <!-- Executes go() function -->
<footer oncanplaythrough="go()">Footer Content</footer>
oncuechangeThe script to be run when the cue changes when using the track element.

 <!-- Executes go() function -->
<footer oncuechange="go()">Footer Content</footer>
ondurationchangeThe script to be run when the length of the media is changed.

 <!-- Executes go() function -->
<footer ondurationchange="go()">Footer Content</footer>
onemptiedThe script to be run when a media resource element suddenly becomes empty, usually due to an error.

 <!-- Executes go() function -->
<footer onemptied="go()">Footer Content</footer>
onendedThe script to be run when the media has reach the end.

 <!-- Executes go() function -->
<footer onended="go()">Footer Content</footer>
onloadeddataThe script to be run when media data is loaded and playback can start.

 <!-- Executes go() function -->
<footer onloadeddata="go()">Footer Content</footer>
onloadedmetadataThe script to be run when metadata has been loaded.

 <!-- Executes go() function -->
<footer onloadedmetadata="go()">Footer Content</footer>
onloadstartThe script to be run whenthe media resource has started loading.

 <!-- Executes go() function -->
<footer onloadstart="go()">Footer Content</footer>
onpauseThe script to be run when the media resource has been paused.

 <!-- Executes go() function -->
<footer onpause="go()">Footer Content</footer>
onplayThe script to be run when the media resource starts playback.

 <!-- Executes go() function -->
<footer onplay="go()">Footer Content</footer>
onplayingThe script to be run when when playback has already begun.

 <!-- Executes go() function -->
<footer onplaying="go()">Footer Content</footer>
onprogressThe script to be run when the browser is fetching the media data.

 <!-- Executes go() function -->
<footer onprogress="go()">Footer Content</footer>
onratechangeThe script to be run when the playback rate changes.

 <!-- Executes go() function -->
<footer onratechange="go()">Footer Content</footer>
onseekedThe script to be run when the seeking attribute is set to false indicating that seeking has finished.

 <!-- Executes go() function -->
<footer onseeked="go()">Footer Content</footer>
onseekingThe script to be run when the seeking attribute is set to true indicating that seeking is currently active.

 <!-- Executes go() function -->
<footer onseeking="go()">Footer Content</footer>
onstalledThe script to be run when the browser is unable to continue fetching media data.

 <!-- Executes go() function -->
<footer onstalled="go()">Footer Content</footer>
onsuspendThe script to be run when media data has stopped before being completely loaded.

 <!-- Executes go() function -->
<footer onsuspend="go()">Footer Content</footer>
ontimeupdateThe script to be run when the media resources current playback position has changed.

 <!-- Executes go() function -->
<footer ontimeupdate="go()">Footer Content</footer>
onvolumechangeThe script to be run when the volume has changed or been muted.

 <!-- Executes go() function -->
<footer onvolumechange="go()">Footer Content</footer>
onwaitingThe script to be run when the media resource has paused but is expected to resume.

 <!-- Executes go() function -->
<footer onwaiting="go()">Footer Content</footer>
Mouse
onclickThe script to be run when when a mouse is clicked on an element.

 <!-- Executes go() function -->
<footer onclick="go()">Footer Content</footer>
ondblclickThe script to be run when a mouse is double clicked on an element.

 <!-- Executes go() function -->
<footer ondblclick="go()">Footer Content</footer>
onmousedownThe script to be run when he mouse button is pressed down while the cursor is over an element.

 <!-- Executes go() function -->
<footer onmousedown="go()">Footer Content</footer>
onmousemoveThe script to be run when the mouse button is moved.

 <!-- Executes go() function -->
<footer onmousemove="go()">Footer Content</footer>
onmouseoutThe script to be run when the mouse cursor moves off an element.

 <!-- Executes go() function -->
<footer onmouseout="go()">Footer Content</footer>
onmouseoverThe script to be run when the mouse cursor moves over an element.

 <!-- Executes go() function -->
<footer onmouseover="go()">Footer Content</footer>
onmouseupThe script to be run when the mouse button is released while the cursor is over the element.

 <!-- Executes go() function -->
<footer onmouseup="go()">Footer Content</footer>
onwheelThe script to be run when the mouse wheel rolls up or down over an element.

 <!-- Executes go() function -->
<footer onwheel="go()">Footer Content</footer>
Scroll
onscrollThe script code to be run when the scrollbar of an element is being scrolled.

 <!-- Executes go() function -->
<footer onscroll="go()">Footer Content</footer> 
Window - NONE