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 trialNarain Ramjieawan
531 PointsIs a section the same as a div?
Just wondering if a div and section tag are one and the same?
4 Answers
Kevin Korte
28,149 PointsIn their default properties, yes, but a section has semantic meaning, a div does not. Semantic tags like section were introduced in HTML5 and help search engines better understand your structure. It's however important not to abuse semantic tags, they have guidelines and purpose. There are plenty of blog posts to read on this topic.
Good question!
sizwengubane
15,244 PointsA section tag defines sections in a document such as capters. The <div> tag defines a division or a section in an HTML document. so basically they are the SAME but the div tag is commonly used to group block level elements to make applying styles to them more easier. If this answer helped, rate my answer
Narain Ramjieawan
531 PointsOkay great thanks for that explanation. So it's safe to say we will be using both html/html5 in this course?
Benjamin Hedgepeth
5,672 PointsTo make it easier for me I think of the use of 'div' tags as a stylistic container for a group of elements that doesn't pertain to the immediate thematic content.