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

Checking document outlines

From: HTML5 First Look

Video: Checking document outlines

I mentioned earlier in the title how the outline algorithm works in HTML5. If you understand the outline algorithm, structuring your page correctly becomes a lot easier. The decision about where to use section content versus flow content and when to use appropriate heading content becomes a lot clearer. Like most things that you do for the first time, this is probably a little easier to grasp if you can visualize the process. So I am going to show you a couple of different ways to make sure that your document conforms to the outline that you are looking for. So I have the trails file that we finished in the last movie which was building headers in HTML5.

Checking document outlines

I mentioned earlier in the title how the outline algorithm works in HTML5. If you understand the outline algorithm, structuring your page correctly becomes a lot easier. The decision about where to use section content versus flow content and when to use appropriate heading content becomes a lot clearer. Like most things that you do for the first time, this is probably a little easier to grasp if you can visualize the process. So I am going to show you a couple of different ways to make sure that your document conforms to the outline that you are looking for. So I have the trails file that we finished in the last movie which was building headers in HTML5.

If you did not complete that exercise, you can go into the 04_04 folder, open the finished_files directory, and open the trails file from there, it's the same file that I am going to be working with here. So either one is fine. Now, I am going to show you two ways that you can check the document outline. One is a web site that has been specifically built to allow you to parse and check the outline of the document and the other one is a plug-in for Google's Chrome. Now both of those options claim that you can test a page locally from your hard drive and they'll parse it.

But I haven't got either of them to work yet to be quite honest with you when I am testing it locally. So I advise you to go ahead and upload a file to a remote testing server. So if you have access to a remote server, you want to go ahead and upload that file now before we go to our next step. Okay, so I have got Google's Chrome opened and you are going to see that I use a lot of different browsers in this particular title and that's because some browsers have capabilities that others don't. In this case, I am just previewing the page that we are working on in Chrome.

You can see here's our header section, over on this side we have our trail info, and then on the right-hand side we have our aside tag that has the rider reviews and the trail news. And at the bottom of our page, there's a very, very small sort of out of the way footer there. Okay, so cool. So I want to make sure that the document outline and visually it looks fine but I want to make sure that the document outline is what we were expecting. So the first thing I am going to show you guys is a site called the HTML5 Outliner. I am going to go ahead and bring that up, and this is a page that is designed to parse your documents using the HTML5 outline algorithm.

So you are supposed to be able to browse for a file, upload the file, and it'll parse it for you, but honestly, I have never had that work. It always returns some type of an error. However, if you can go ahead and upload a file. In this case, I am going to go ahead and upload this file to our Explore California web site. If you can go ahead and upload that, you can see here, for example, this is trails.htm. If I outline this, it goes ahead and returns the outline for me and it's exactly what we were expecting. The very top element is Explore California Trail Guide and again that's the headline.

Directly underneath that, we have our Main page navigation, and this is why we went ahead and put that h1 tag there because if we hadn't, it would simply say Untitled Navigation. Below that we have Ojai Trails and nested inside that is the individual trail that we are looking at, Northridge Loop. It has two sections, Skill level and Surface. And then finally, here's our aside Trail News. Inside that we have the promotional video for Cycle California and the Rider Reviews. So that was exactly what we were looking for. So the HTML5 Outliner page is a really nice way of checking out one of your pages that you have online to make sure the document structure is producing the proper outline.

Now I promised I'd show you a couple of different ways and there is a reason that I have Chrome open. So I am going to click on my next tab here and I am going to go to code.google.com. You can see this is /p/h5o. This is the HTML5 outliner, and again, this is a repository of a couple of different techniques that can help outline your pages. There is a Chrome extension that we are going to take a look at here in just a moment. There is a bookmarklet that you can use. There is a Firebug extension that we are working on. It's not quite finished yet. What's really nice is the JavaScript itself has been minified and if you want to download that JavaScript and build your own parser, you could do that.

I am going to click on the Chrome extension right there, which is going to take me to the Google Chrome extension page. This is the HTML5 Outliner, and you could really just search for that if you wanted to. It's inside the Google.com's Chrome site and I am just going to go ahead and install this. It's going to ask me if I want to install it, I am going to say yes, and now my HTML5 Outliner is now installed. Now, what's really interesting is that from this point on, regardless of whether I am browsing one of my pages or somebody else's, if I am on a page that is using HTML5 document structure, this little icon is going to show up in the upper right-hand corner.

That means that I am going to be able to click on that and find the outline of that document. So if I go to my Explore California Trail Guide page, I don't see the outline there because it's opening up a local resource. So what I am going to do is I am going to type in the direct link to this page that I've uploaded online. So here's that page uploaded online. You can see that's just an image. That asset obviously hasn't been uploaded, neither has this one, but it's really all about the page structure that we are interested in. Again, as I mentioned before, there is our icon in the upper right-hand corner.

If I go ahead and click on that, we can see the exact same outline. So Explore California Trail Guide, Main page navigation, Ojai Trails and all the things nested inside that that we were expecting to see. So there's a couple of different options for you when you are wanting to make sure that the document structure that you are creating is generating the proper outline. Now hopefully, this helps to illustrate why it's so important to understand the new content models and outline algorithm in HTML5. Once you understand those, the mystery of when to use a header, how heading content should be structured, when to use flow content over section markup, all that stuff becomes a lot clearer.

I'd really encourage you to use services like this, like Google Chrome's Outline plug-in or the HTML5 Outline page as you are developing to make sure that the structure of your code matches the desired structure of the content.

Show transcript

This video is part of

Image for HTML5 First Look
HTML5 First Look

50 video lessons · 74383 viewers

James Williamson
Author

 
Expand all | Collapse all
  1. 3m 56s
    1. Welcome
      1m 1s
    2. Using the exercise files
      1m 50s
    3. Who is this course for?
      1m 5s
  2. 21m 12s
    1. Exploring prior standards
      4m 26s
    2. Why do we need HTML5?
      3m 32s
    3. HTML5 timeline
      4m 24s
    4. Current HTML5 support
      4m 25s
    5. What HTML5 is (and what it isn't)
      4m 25s
  3. 27m 49s
    1. HTML5 vs. HTML4
      3m 25s
    2. New structural tags
      6m 1s
    3. New content tags
      4m 7s
    4. New application-focused tags
      5m 32s
    5. Deprecated elements
      4m 28s
    6. API overview
      4m 16s
  4. 22m 29s
    1. Content models
      5m 33s
    2. Understanding the outline algorithm
      3m 21s
    3. The role of ‹div› tags
      4m 20s
    4. Using ID and class attributes
      2m 6s
    5. DOCTYPE declarations
      4m 16s
    6. Character encoding
      2m 53s
  5. 41m 27s
    1. Basic page structure
      3m 40s
    2. Structuring top-level elements
      7m 30s
    3. Structuring interior content
      8m 42s
    4. Building headers
      9m 11s
    5. Checking document outlines
      5m 46s
    6. Ensuring cross-browser structure
      6m 38s
  6. 27m 53s
    1. New input types
      5m 57s
    2. Setting form autofocus
      2m 53s
    3. Using placeholder data
      4m 4s
    4. Marking required fields
      3m 24s
    5. Working with number inputs
      5m 49s
    6. Using date pickers
      5m 46s
  7. 1h 1m
    1. Canvas overview
      6m 21s
    2. Adding canvas content
      8m 58s
    3. Drawing in the canvas environment
      12m 9s
    4. Drag-and-drop API overview
      6m 18s
    5. Offline applications overview
      7m 11s
    6. Video overview
      5m 45s
    7. Encoding video
      8m 23s
    8. Adding video
      5m 58s
  8. 57m 33s
    1. Geolocation API overview
      5m 50s
    2. Web storage API overview
      5m 40s
    3. WebSockets overview
      4m 16s
    4. CSS3 overview
      6m 38s
    5. Enhancing typography with CSS3
      7m 42s
    6. Using @font-face
      7m 11s
    7. Styling HTML5 with CSS3
      10m 23s
    8. Using CSS3 transitions
      9m 53s
  9. 5m 6s
    1. Final thoughts
      3m 49s
    2. Goodbye
      1m 17s

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 First Look.

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.