HTML Tag Reference - HTML tag <footer>








The <footer> element is the complement to header and represents the footer for a section. A footer usually contains summary information about a section.

The <footer> element cannot be a descendent of the address or header element and cannot be a descendant of another footer element.

Browser compatibility

<footer> Yes 9.0 Yes Yes Yes

What's new in HTML5

The <footer> tag is new in HTML5.





Global Attributes

The <footer> tag supports the Global Attributes in HTML.

Event Attributes

The <footer> tag supports the Event Attributes in HTML.

Default CSS Settings

footer { 
    display: block;
}

Example

A demo showing how to use <footer> tag.

<!DOCTYPE HTML> 
<html> 
<body> 
    <header> 
        <hgroup> 
            <h1>H1</h1> 
            <h2>H2</h2> 
        </hgroup> 
    </header> 
    <section> 
        <header> 
            <h1>H1</h1> 
        </header> 
    </section> 
    <footer id="mainFooter"> 
        <p>This is a text.</p>
    </footer> 
</body> <!--from   w ww  . j av a2  s .c om-->
</html>

Click to view the demo