Footers
At long last, we have arrived at the end of our example page. The last thing I want to talk about is the last thing on the page: the footer. The footer was originally marked up like this:
<div id="footer"> <p>§</p> <p>© 2001–9 <a href="#">Mark Pilgrim</a></p> </div>
This is valid HTML5. If you like it, you can keep
it. But HTML5 provides a more specific element for
thisâthe <footer>
element:
<footer> <p>§</p> <p>© 2001–9 <a href="#">Mark Pilgrim</a></p> </footer>
Whatâs appropriate to put in a <footer>
element? Probably whatever youâre putting in a <div id="footer">
now. OK, thatâs a
circular answer. But really, thatâs it. The HTML5
specification says: âA footer typically contains information about its
section such as who wrote it, links to related documents, copyright data,
and the like.â Thatâs whatâs in this example pageâs footer: a short
copyright statement and a link to an about-the-author page. Looking around
at some popular sites, I see lots of footer potential:
CNN has a footer that contains a copyright statement, links to translations, and links to terms of service, privacy, âabout us,â âcontact us,â and âhelpâ pages. All totally appropriate
<footer>
material.Google has a famously sparse home page, but at the bottom of it are links to âAdvertising Programs,â âBusiness Solutions,â and âAbout Googleâ; a copyright statement; and a link to Googleâs privacy policy. All of that could be wrapped in ...
Get HTML5: Up and Running now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.