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 trialPaul M
16,370 Points<div> Element Support
I see the element <div> in most lessons, what does it really mean?
2 Answers
Jason Anders
Treehouse Moderator 145,860 PointsThe div (or Divisional) tag is mostly used to aid in stylistic purposes (for grouping). See more in the MDN Documentation
:)
Benjamin Ferguson
2,955 PointsIt's essentially used to "divide" your html into different sections, much like the "section" tag, though I believe the section tag did not exist until HTML5 and has some additional purposes. But I think they mostly are used for styling.
Ken Chung
17,585 PointsKen Chung
17,585 PointsElements are the specific type of HTML tags you're using. Not all elements are the same, some will either contain 1 tag by itself or 2 tags. For example the p element has two tags, or the image element only has one tag.
The element p is an element used in HTML to define paragraphs and display text onto a webpage, the image element is used to define an image and display it onto a webpage.
I hope this helps you, please correct me if I'm wrong for the experts out there!