footer

In this module we work with the footer tag.

File Location

For this module, you should be working in the following location:

    javascript-library
        └── 0-PreWork
            └── 1-HTML-Basics

                12-footer.html <---You should be here.

            └── 2-CSS-Basics
            └── 3-JavaScript-Basics
            └── 4-assets

Description

A footer element is specific for a section or document. A footer should contain information about the containing element. Items inside a footer at the bottom of a page might be used for copyright, contact information, terms of use, and author information.

Sample Code

Add the following sample code to your file:

<!DOCTYPE html>
<html>
<head>
    <title>Footer</title>
</head>
<body>
    <section style="background-color: blue; height: 600px;">
        <h1>Greetings!</h1>
        <span>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
        tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
        quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
        consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
        cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
        proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</span>
    </section>
    <footer style="background-color: grey;">
    <p>Copyright © 2006 The Example Company</p>
    <p><a href="about.html">About</a> -
    <a href="policy.html">Privacy Policy</a> -
    <a href="contact.html">Contact Us</a></p>
    </footer>
</body>
</html>

Discussion

It's probably self-evident, but <footer> is used in virtually every web application. How it's configured, and what information is present in the <footer> depends on the needs of the application.

Challenge

Shift the elements inside of the footer you just built. Remove existing elements, and try adding new elements. See how changes you're making impact the result.

Extra Reading

Here's some extra reading for this concept: http://html5doctor.com/the-footer-element/ http://www.creativebloq.com/web-design/website-footers-1131597

Last updated