HTML5: Grouping content with <section> element

This entry is part 10 of 34 in the series HTML5

The section element is an area of content or an area of page.

It can be used to group a whole or a section of content.

A section can contain article elements, and article elements can have their content split into sections.

<!DOCTYPE html>
<head lang='en'>
    <meta charset='UTF-8'>
    <title> - HTML 5</title>
        section {
            clear: both;
            border: 2px solid #000;
            padding: 1%;
            width: 97%;
            <h1><a href='#'>Rod Stewart</a></h1>

        <p>Roderick David 'Rod' Stewart, CBE is a British rock singer-songwriter. Born and raised in London, he is of
            Scottish and English ancestry. Stewart is one of the best-selling music artists of all time, having sold
            100 million records worldwide.</p>


Notice that with section as an element, I can put a border style to this section of the page.

Series Navigation<< HTML5: Using the new <article> element
HTML5: Creating sidebar with the <aside> Element >>

Leave a comment

Leave a Reply