Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML

Paul M
Paul M
16,370 Points

<div> Element Support

I see the element <div> in most lessons, what does it really mean?

Elements 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!

2 Answers

Jason Anders
MOD
Jason Anders
Treehouse Moderator 145,624 Points

The div (or Divisional) tag is mostly used to aid in stylistic purposes (for grouping). See more in the MDN Documentation

:)

It'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.