Developing in HTML5 with the New Structure Elements: Elements that Define Content | HTML Goodies

Developing in HTML5 with the New Structure Elements: Elements that Define Content

Written By
Curtis Dicken
Curtis Dicken
Feb 9, 2012
9 minute read

HTML 5 makes a leap forward in defining page content with several new “structure” elements that are designed to give web pages more … you guessed it … structure. In our previous article Developing in HTML 5 with the New Structure Elements: The Basics, we covered the basic structure elements of header, nav, section and footer. In this article we will start with the same example and expand it by adding the more content specific elements of article, aside, figure,figcaption, hgroup and iframe. We’ll also expand on the section element by adding a right and left column to our example. If you are not familiar with the basic elements of header, nav, section and footer yet, I invite you to review Developing in HTML 5 with the New Structure Elements: The Basics before you continue.

Page Layout by Example

Since we are going to be focusing on the structural elements of HTML 5, we are going to keep our example simple. In our article Developing in HTML 5 with the New Structure Elements: The Basics we created a simple page structure with a header, navigation bar, main content area and a footer. In this article we are going to modify the main content area to add a left and right column and add several elements inside the main content area to further define our content.

Note: In order to keep the examples as simple as possible we’ll be defining all of our style definitions within the elements themselves instead of placing the definitions in a CSS file. Just keep in mind that when you apply these examples in real life we suggest that you make your website development more manageable by using a CSS file and use the class attribute for your style definitions.

Defining the Page

Below is just the basic HTML we need to create the top portion our page which includes the header and navigation bar. This portion is virtually identical to our previous example with only a few content changes to the header. Just note that we are using the style attribute to define styles instead of the class attribute and a CSS (Cascading Style Sheet) file. If you are not familiar with CSS we suggest that you review the multitude of CSS articles here on HtmlGoodies.com.

    HTML 5 Structure Elements: Elements that Define Content

HTML 5 Structure Elements

Elements that Define Content

Left, Center and Right Columns Using the

Element

As discussed in Developing in HTML 5 with the New Structure Elements: The Basics, the section element is intended to be the “catch-all” for the sections of content on your web page layout. In our redesign we have broken the main content area into three sections, the left column, the main content area, and the right column. We will be exclusively using the main content area for our examples to follow but this should give you a good idea how to layout your pages in a multi-column format. Please note the code example here only includes the left column and the opening declarations for the main content area. The closing tags for the main content area and the right column are in the Closing Out the Page section below.

  

                Left Column

 

   

My Main Content Section

,
and
Elements

The first element that you see below is the article element. The article element is intended to define content that can stand alone within a page. Ideally it could be taken completely out of the page where it currently resides and be placed in any other page on your website and still make sense. In our case this article is being used as an example of the article element itself as well as the figure and figcaption elements. We have also created a fake figure example with associated caption. We have styled the figure so that it is right justified and the text of our article wraps around it. Hopefully this illustrates some of the common website development tasks of articles, figures and text wrapping.

You should also notice the caption that we created with the figcaption element. The figcaption element makes a simple block of caption text for your figures. The element is placed within the figure element so that the browser understands the association between your figure and its caption. You can style the figcaption element just like any other element. In this example we have simply defined our caption to be small and italicized. When you view this entire example in a browser you will notice how the caption text stays within the defined figure space.

       

My Lead Article with Figure Element

       

                ”Projected

               

Projected Widget sales for some year by some company in some country.

           

            The article element is intended to define content that can stand alone within a page.

            Ideally it could be taken completely out of the page where it currently resides

            and be placed in any other page on your website and still make sense. In our

            case this article is being used as an example of the article element

            itself as well as the figure and figcaption elements. We have

            created a fake figure example with associated caption. We have styled the figure

            so that it is right justified and the text of our article wraps around it.

            Hopefully this illustrates the common website development tasks of articles,

            figures and text wrapping.

            

You should also notice the caption that we created with the figcaption

                element. The figcaption element makes a simple block of caption text

                for your figures. The element is placed within the figure element so that the

                browser understands the association between your figure and its caption. You can

                style the figcaption element just like any other element. In this example we

                have simply defined our caption to be small and italicized. Notice how the caption text

                stays within the defined figure space.

   

   


and

Finishing Out the Example

All that is left now is to close out all of our tags and finish up the page. The markup below includes the right column section, the footer and all of the closing tags that we need to finish our example.

   

        Right Column

   

    Home

     | 

    About

     | 

    Contact Us

     | 

    Sitemap

   

    Copyright © 2012 – All rights reserved

Conclusion

We encourage you to download and look at this complete example in a browser in order to get a real feel for how these elements can be used in everyday development. All of these elements, save the iframe, are very intuitive and fully implemented in all modern browsers. The elements also make your HTML markup more readable for developers and search engines alike. Search engines will especially appreciate how your content is more organized. That is not to say that using these new HTML 5 elements are guaranteed to boost your search engine rankings, at least not yet anyway. Although, as we see the older browsers naturally fade away we may see search engine guidelines begin to shift favor to HTML 5 markup.

Download the HTML markup and images.

Happy coding!

HTML Goodies Logo

The original home of HTML tutorials. HTMLGoodies is a website dedicated to publishing tutorials that cover every aspect of being a web developer. We cover programming and web development tutorials on languages and technologies such as HTML, JavaScript, and CSS. In addition, our articles cover web frameworks like Angular and React.JS, as well as popular Content Management Systems (CMS) that include WordPress, Drupal, and Joomla. Website development platforms like Shopify, Squarespace, and Wix are also featured. Topics related to solid web design and Internet Marketing also find a home on HTMLGoodies, as we discuss UX/UI Design, Search Engine Optimization (SEO), and web dev best practices.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.