Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Laurence Foley
16,695 PointsIs this the correct use of the <section> element?
Is there anywhere in this markup where I should or shouldn't be using the section element and is there anything I can do to make this markup more semantic?
<html lang="en">
<head>
<meta charset="utf-8">
</head>
<body>
<header class="mainHeader">
<div class="container">
<div class="content">
<h1>Heading</h1>
<h2>Sub Heading</h2>
</div>
</div>
</header>
<section class="about">
<div class="container">
<div class="grid-container">
<div class="grid-4">
<div class="content">
<h2>About Us</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Similique reprehenderit sunt voluptate accusantium, sapiente in ratione itaque quaerat, repudiandae nulla. Laudantium commodi, molestias quis voluptas. Reiciendis voluptatem omnis dicta. Suscipit.</p>
<a href="#">Read More</a>
</div>
</div>
<div class="grid-4">
<div class="content">
<h2>About Us</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Similique reprehenderit sunt voluptate accusantium, sapiente in ratione itaque quaerat, repudiandae nulla. Laudantium commodi, molestias quis voluptas. Reiciendis voluptatem omnis dicta. Suscipit.</p>
<a href="#">Read More</a>
</div>
</div>
<div class="grid-4">
<div class="content">
<h2>About Us</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Similique reprehenderit sunt voluptate accusantium, sapiente in ratione itaque quaerat, repudiandae nulla. Laudantium commodi, molestias quis voluptas. Reiciendis voluptatem omnis dicta. Suscipit.</p>
<a href="#">Read More</a>
</div>
</div>
</div> <!-- end of grid container -->
</div>
</section>
<section class="ourProdoucts">
<div class="container">
<div class="content">
<header>
<h2>Heading</h2>
</header>
<ul class="gallery group">
<li><img src="img/img.jpg" alt="img"></li>
<li><img src="img/img.jpg" alt="img"></li>
<li><img src="img/img.jpg" alt="img"></li>
<li><img src="img/img.jpg" alt="img"></li>
<li><img src="img/img.jpg" alt="img"></li>
</ul>
</div>
</div>
</section>
<footer>
<div class="container">
<p>© Company name | 2015</p>
</div>
</footer>
</body>
</html>
1 Answer
Brandon Bolin
760 PointsLooks good.
There is also a new HTML5 tag called <main> You can essentially wrap this around anything after the header, ending just before the footer.
Cheers