New Feature: Playlist Center! Pick a topic and let our playlists guide the way.

Start learning with our library of video tutorials taught by experts. Get started

HTML5: Structure, Syntax, and Semantics
Illustration by Don Barnett

The aside element


From:

HTML5: Structure, Syntax, and Semantics

with James Williamson

Video: The aside element

Another new element that's going to help out greatly with structuring page content is the aside element. The aside element allows us to mark up content that is tangentially related to the content around it. This can be very helpful when defining content relationships. Now, we can see this from the specification that the aside element belongs to both Flow and Sectioning content. One thing that I just want you to keep in the back of your mind is that the nav element, article element, sectioning element, and now the aside element, all of these also belong to Sectioning content, so just kind of file that away for later.
Expand all | Collapse all
  1. 2m 20s
    1. Welcome
      48s
    2. Using the exercise files
      1m 32s
  2. 19m 7s
    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 53s
  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

Watch this entire course now—plus get access to every course in the library. Each course includes high-quality videos taught by expert instructors.

Become a member
please wait ...
HTML5: Structure, Syntax, and Semantics
4h 34m Beginner May 31, 2011

Viewers: in countries Watching now:

Gain a deeper understanding of HTML5 and learn how to create richer, more meaningful web pages with structural tags and descriptive attributes. In this course, author James Williamson presents an overview of HTML5 and its development, defines the new tags and attributes, and discusses how browsers parse and display HTML5 content. The course also includes step-by-step instructions for constructing an HTML5 document with a header and footer, navigation, content groups, and formatting.

Topics include:
  • Defining basic elements
  • Exploring the content model
  • Creating document sections
  • Using hgroup to override sectioning
  • Using the proper nesting structure
  • Choosing the right structural element
  • Using class and ID attributes
  • Building navigation
  • Grouping content with asides
  • Using divs in HTML5
  • Creating block level links
  • Defining link relationships
  • Understanding current browser support
  • Adding support for elements in older browsers
Subjects:
Developer Web Web Design Web Foundations Programming Languages Web Development
Software:
HTML
Author:
James Williamson

The aside element

Another new element that's going to help out greatly with structuring page content is the aside element. The aside element allows us to mark up content that is tangentially related to the content around it. This can be very helpful when defining content relationships. Now, we can see this from the specification that the aside element belongs to both Flow and Sectioning content. One thing that I just want you to keep in the back of your mind is that the nav element, article element, sectioning element, and now the aside element, all of these also belong to Sectioning content, so just kind of file that away for later.

If I scroll down a little bit, we can see the description here, and the aside element represents a section of the page that consists of content that is tangentially related to the content around the aside element. Here is a really important part though, "which could be considered separate from that content." So again, it's only partially related to the content around it. As it mentions here, such sections are often represented as sidebars in printed typography, and to be honest with you, that's how I see most people using this element; most people use the aside to represent a sidebar. I certainly do it myself. However, it can be used for a lot more than that.

Notice it can be used for typographic effects like pull quotes, advertising, groups of navigational elements, like in a blog for example, all the blog roll links that you have on the left-hand side, those could be in an aside element because they're related to the content around them, but they are not specific to it. And again, notice that it says in description here, "for other content that is considered separate from the main content of the page." It's got a couple of examples here. Most of them do exactly what you think they would do. It basically describes--this example shows how an aside is used to mark up background material on Switzerland in a much longer news story on Europe.

So again, background material in Switzerland would relate to a news story on Europe, but it wouldn't be absolutely required for you to understand the content of the article. They have asides marking up pull quotes, and they also have them for marking up blog rolls and other side content that you might have on a blog. So they have got a couple of very useful examples here as well. We'll be using the aside element multiple times in our title, and occasionally we are going to be using it as a root-level element, meaning it's right there inside the body tag, and other times we are going to be using it inside, or nested inside, of other elements.

And where you have the aside tag really dramatically affects its meaning. So as we go through the course, and we go to the title, and we use the aside tag, I will make sure that I discuss that, that in terms of where the aside elements is used dramatically affects the meaning and the relationship of the content around it. So let's go back to our HTML5 file, and we're going to use our aside element on our HTML5 page. Now, this from the 02_07 folder. This is as html5.htm. And I am going to do basically what everybody else does with this.

I am going to go right down here, find my sidebar. So in the sidebar, we have monthly specials, different tour specials that are going on with our company. Now, although it's related to the rest of the content on the page because it is tours, that this company sells tour packages, it is independent of it, and it is only tangentially related to it. So that actually is a really good example of the section of content that could benefit from the aside tag. So I am going to go ahead and do an opening and closing aside tag, and I do want to get rid of this hidden attribute. The hidden attribute is a new attribute in HTML5, and it essentially hides the content of the page until you reestablish it later on through scripting. So it's kind of like being able to hide a widget until somebody wants to do something with it, and the widget appears again.

But we don't need to do that with our sidebar. We want our sidebar. So we are going to replace the div with the aside and get rid of that element. Now, I mentioned just a second ago that where you use the aside element dramatically affects its meaning. Because this is used right on the body element, meaning it's not nested inside of any other element, that means that the contents of the aside element should relate to the entire page content--so not just one section of the page, it should relate to the entire page. So in this case, because our sidebar relates to the entire page around it, we used the aside element for it.

I'm sure just like this page, you've often seen asides used in the place of sidebars. Now, this is legitimate use for it, but there is a reason it is not named the sidebar element. Now, just keep that in mind when you are deciding to use it or not, that it is designed to identify content related to the content surrounding it, and if you do that, you are going to be using the element correctly.

There are currently no FAQs about HTML5: Structure, Syntax, and Semantics.

 
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.
Upgrade now


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 Upgrade now

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

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.