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

HTML5: Structure, Syntax, and Semantics

The article element


From:

HTML5: Structure, Syntax, and Semantics

with James Williamson

Video: The article element

Much like the section element, the article element helps you define distinct sections of content within your pages. However, the article element plays a very specific role in identifying content, so let's take a look at the specification to see what kind of role the article element can play for us. Now, once in categories, we have our Flow content and Sectioning content, but it's just like the sectioning element. I am going to scroll down a little bit so I can see this definition a little bit more clearly. Notice that the article element presents a self-contained composition in a document that is in principle independently distributable or reusable, such as in syndication.
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 article element

Much like the section element, the article element helps you define distinct sections of content within your pages. However, the article element plays a very specific role in identifying content, so let's take a look at the specification to see what kind of role the article element can play for us. Now, once in categories, we have our Flow content and Sectioning content, but it's just like the sectioning element. I am going to scroll down a little bit so I can see this definition a little bit more clearly. Notice that the article element presents a self-contained composition in a document that is in principle independently distributable or reusable, such as in syndication.

So this is content that can be repurposed and republished, or syndicated. They give examples of forum posts that some of you might make, magazine or newspaper articles, a blog entry, user- submitted contents, interactive widgets-- really any other independent item of content. Now it's that last line I want you to focus on, "any other independent item of content." Did you notice how much leeway the specification is giving you, the author, in determining what that might be? And of course, this is leading to some of the confusion around it, but seriously, look at it this way.

I've heard some people describe the article as a distinct item--you know, think like article of clothing, a shirt, or a pair of pants, some socks, something like that. If the element in your page represents an independent article apart from the page, then it's something that the article element can be used for. Other people have a much stricter interpretation of it, that if you are not going to syndicate something, if you're not going to repurpose it, then you probably shouldn't use the article element. I look at it this way. If its content that can be republished, if it's content that can be syndicated or that you might want another user agent to be able to come in and access and can be understood by itself with none of the rest of the page content around it, then the article element is more than likely appropriate.

Notice also, it mentions, when article elements are nested, the inner article elements represent articles that are in principle related to the contents of the outer articles. So when you are determining whether to nest those, that comes into play. And they mention user-submitted comments in our a blog entry, and that's typically where you'll find that usage of that. As a matter of fact, when we scroll down, we can see a couple of examples. The first example shows a blog post. You can see article and closing article tag, and you can see that we have some comments down here or a link to show some comments. And if we do the same blog post, when we look at this, you can see down here now, each of the individual comments by the users are contained in the article tag as well.

Most examples that you see using the article element are blog posts, because it's such an obvious choice for that blog post. They're independent; they stand on their own. They can be republished or repurposed, so it kind of makes sense for the article element. And that's not a bad pace to start with that, if you want to grasp kind of the meaning of the article element is. So now that we've talked about that a little bit, let's go back into the pages that we're building and use the article element within our page. So, here we are, back, and I have the html5.htm file open from the 02_06 directory, and this is going to be kind of anti-climactic, to be quite honest with you.

I am going to scroll down, and our section that we created here where it says "Come explore our world your way, Explore California is the best way to explore our wonderful state!" so forth, and so on, this could be a lot of content, but this could be an article that we might want to republish on other pages or other sites or something that we want to syndicate. If that's the case, then the section element is not the element to use here, and it would be the article element. So I am going to go ahead and change the opening and closing tags to the article element.

I am going to go ahead and save that, and you might say to yourself, well, wait a second. You are just changing elements around, and we don't really know what this means-- and that's exactly my point. My point is that as a web author, it's your job to understand the content of your page and how that content needs to be represented. So you have to make that judgment call as to whether this is an independent piece of content. That's a much easier call to make if you know that that content is going to be repurposed or syndicated in say an RSS feed, or that might be in some type of aggregator grabbing that information and republishing it somewhere, then it's a lot easier to say to yourself, okay, I just need to use the article element here.

If not, then you really have to make that determination for yourself, and this is one of the elements that I think, frankly, I've seen people sort of overuse. It's sort of become the replacement for the div tag in a lot of cases, and that is not what this element is for. So, make sure you spend some time really thinking about the content on your page and whether the article element is appropriate. So, just as I mentioned, just like with the section element, we are going to talk more about the article element and when it's appropriate to use, all throughout this title, actually. For now, just concentrate on the fact that articles are appropriate when representing stand-alone or syndicated content, and in the future it will make it a lot easier for folks to construct feeds, repurpose that content, or segregate content for quick searches.

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

Share a link to this course
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.

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
Welcome to the redesigned course page.

We’ve moved some things around, and now you can



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.

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.