Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Structuring footers

From: HTML5: Structure, Syntax, and Semantics

Video: Structuring footers

Much as with headers, it's important to look at footers as more than just a place to put closing content. Footers can have a rich structure all of their own, and as we are going to see, can be used in some pretty surprising ways. So, what we want to do now is structure the footers for our trails page, and this is one I have opened up from the 04_09 folder, so that's where you can find this example. Since we are structuring footers, I am going to start at the bottom of the page. That's where our page footer is. So I am going to scroll down, and you can see that in this file we have added some content down there for the footer. Now, let's take a look at the content.

Structuring footers

Much as with headers, it's important to look at footers as more than just a place to put closing content. Footers can have a rich structure all of their own, and as we are going to see, can be used in some pretty surprising ways. So, what we want to do now is structure the footers for our trails page, and this is one I have opened up from the 04_09 folder, so that's where you can find this example. Since we are structuring footers, I am going to start at the bottom of the page. That's where our page footer is. So I am going to scroll down, and you can see that in this file we have added some content down there for the footer. Now, let's take a look at the content.

We have return to top, which is obviously a link back up to the top of the page for people that have scrolled down. We have telephone numbers, email links, some legal content, Explore California, the address, some phone numbers. Now, again exposing this in outline, it's a judgment call. Some people might want the contact info, at least the address, listed in the document outline. In this case, I don't. I don't want that in the outline. It's footer information for people that scroll down. They can read through it, but I don't really need to jump down to it. I don't need it to be exposed in any way, especially since in my site I would probably have a contact page where someone would navigate to do that in a more thorough way.

The first thing I am going to do is just structure each of these elements, and I am going to start with this link that's going to return us to the top of the page. So, I am going to go ahead and wrap that in a paragraph, and in addition to a paragraph, I need to make this a link. So I am going to go ahead and create a link. The href attribute for this is actually going to go up to main header. Now, you may have remembered earlier, we gave the top header an ID of mainHeader, so this is going to link right back up to that. It's another perfect use case of using IDs. That's a perfect reason to use them.

So, we will go ahead and close that out and then close the link. Okay, cool! Next thing I am going to do is for my telephone, I am going to wrap that in a paragraph as well, and we are going to use something kind of interesting here for telephone. So I am going to go ahead and wrap this first in a paragraph, and then I am going to come in and I am also going to wrap it in a link. Here, I am going to do another href attribute, but the href attribute isn't going to be your normal link. So I am going to use the tel link, and essentially, this is going to be for mobile devices. This will make the link clickable in a mobile device and go ahead and dial this number. So I am just going to do tel://866-555-- which of course isn't a real number so don't try to dial it-- -4310. Okay cool! I'll go ahead and give that a title as well, and I am just going to title this, "give us a call." Now, I am going to do the same thing here for my explorecalifornia info.

I'll go ahead and first initially wrap that in a paragraph tag and then of course, I will do a nice little link here, href, and we are just going to do a mailto link. So we will do mailto, and we will just use the email address, info@explorecalifornia.info. Now, this is bad practice. You don't want to do this if you can avoid it because this is going to get spammed all to pieces, but again, this is just an example of structuring the footer. The next I am going to do is the all content and the copyright data. We are going to wrap that in a paragraph. So you can see everything is being wrapped in a paragraph.

We are not using any headings because we don't want this to show up inside the document outline. The next thing I am going to do is for terms of use, I am just going to go ahead and highlight terms of use, and we are just going to wrap that in another link tag and href there is just going to go to terms.htm, and we will give it a title, "our terms of use." Okay, the Explore California address, we are going to go ahead and wrap that in a paragraph tag, and then each line after that is going to get wrapped in a paragraph tag--kinda sorta. For example, this 5606 Nota Street Ventura, CA, that all needs to get wrapped in a paragraph tag.

So, both of those lines are wrapped in a single paragraph, and then after the street address, I am just going to go ahead and do a line break there. I am going to do the same thing for the phone number. So they both get wrapped in a paragraph tag, and then we are just going to throw in a line break right after the initial telephone number. Okay, cool! Now, let's go ahead and save that. And we have one more footer that we need to do. I am going to scroll up into our main article, and we can see that some additional content has now been added to the main article. So after Final thoughts, we now have this About the author: Jeff Layton lives in Ventura, California.

And one of the things that we can remember from the specification is that contact information, or information about the author, the article, is really perfect for a footer. So a footer would be a very logical element to place here, but you might be saying yourself, well, wait a second, though. This is in the Trail Review section, which is also in its own individual article, and it's not at the bottom of either of those because the Comment section is coming below that. Well, that's okay; remember, footer elements do not have to be at the bottom of an element. Often they're encountered there, but they don't have to be. So, in this case, we are going to go ahead and put a footer, even though it's not quite at the bottom of our content.

So, the footer is going to go around 'about the author' and then the paragraph 'Jeff Layton lives in Ventura, California'. Now, again, these are the things that I don't really necessarily want to have show up in the outline. So, instead of using a heading for them, I'm going to be using paragraphs for both of these. So, opening and closing paragraphs for both of those, and we will also go ahead and do a quick little mailto link right around his email address. So a tag, do a little href, mailto:jeffl@exlorecalifornia.org.

The delicious irony of course is that that's not a real email address so the spam box will have fun sending content into the ether. Okay, now I am going to go ahead and save this, and again, if I preview this in my browser and check the outline, we haven't affected the outline at all. We don't see anything about the author. We don't see anything at the bottom about our contact information. So our footers are fully structured and presenting information the way we want it to be presented, but they are not showing up in the document online, which again, is what we want for this particular document. Now, keep in mind, just like we've previously discussed, footers aren't considered sectioning content; that's why we don't see them in the outline.

Now if you want the contents of the footer exposed in the document outline, you are going to have to add the proper sectioning elements to the footer's content. You can put it an aside in a footer. You could put an article or a section in a footer. A section is probably something that's probably a little bit more logical. Or you could just go ahead and do implicit sectioning using headings. You should also remember that footers don't have to appear at the bottom of the element, just that the content inside of them needs to fit the suggested content type for footers--the information about the author, related links, legal data, indexes, things like that.

Okay, now that we've finished the basic structure of our site, it's time to return our attention to some of the new or modified grouping elements in HTML5, and we are going to go ahead and begin that process in our next chapter.

Show transcript

This video is part of

Image for HTML5: Structure, Syntax, and Semantics
HTML5: Structure, Syntax, and Semantics

46 video lessons · 36555 viewers

James Williamson
Author

 
Expand all | Collapse all
  1. 2m 20s
    1. Welcome
      48s
    2. Using the exercise files
      1m 32s
  2. 18m 41s
    1. A brief overview of HTML5
      3m 57s
    2. What's in the HTML5 specification?
      8m 17s
    3. Why do we need new structural elements?
      6m 27s
  3. 50m 33s
    1. Defining HTML5 documents
      5m 5s
    2. HTML5 syntax
      9m 14s
    3. The header element
      5m 22s
    4. The nav element
      4m 55s
    5. The section element
      4m 51s
    6. The article element
      4m 48s
    7. The aside element
      4m 13s
    8. The footer element
      4m 17s
    9. Content model overview
      7m 48s
  4. 35m 28s
    1. Understanding the outline algorithm
      3m 17s
    2. Creating document sections
      8m 25s
    3. Using headings properly
      9m 1s
    4. Using hgroup to override sectioning
      4m 17s
    5. Properly nesting structure
      7m 17s
    6. Sectioning roots
      3m 11s
  5. 58m 30s
    1. Organizing content
      4m 41s
    2. Planning document structure
      5m 47s
    3. Choosing the right structural element
      4m 43s
    4. Checking document outlines
      5m 27s
    5. Coding initial page structure
      5m 28s
    6. Using class and ID attributes
      5m 31s
    7. Structuring headers
      13m 13s
    8. Building navigation
      7m 1s
    9. Structuring footers
      6m 39s
  6. 1h 27m
    1. Working with figure and figcaption
      7m 12s
    2. Grouping content with asides
      3m 46s
    3. Using divs in HTML5
      5m 0s
    4. Working with lists in HTML5
      7m 10s
    5. The return of bold and italic
      5m 52s
    6. Citing works semantically
      6m 32s
    7. Using the address element
      5m 24s
    8. Using the small element
      4m 24s
    9. Using the mark element
      5m 16s
    10. Working with date and time
      11m 55s
    11. Creating block-level links
      8m 53s
    12. Understanding link relationships
      9m 28s
    13. Defining link relationships
      6m 23s
  7. 17m 22s
    1. Current browser support
      7m 38s
    2. Ensuring block-level display
      4m 3s
    3. Adding support for elements in older browsers
      5m 41s
  8. 3m 46s
    1. Additional Resources
      3m 46s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now "Already a member? Log in

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed HTML5: Structure, Syntax, and Semantics.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.