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 trial4 Answers
Kieran Barker
15,028 PointsThey’re generic block- and -inline level containers, respectively, to be used when a more semantic element is inappropriate. If you’re only grouping elements together for the sake of styling, for example, rather than for semantic reasons.
Sky King
Courses Plus Student 95 PointsAlready have a good explanation, but let me try breaking it down a little. when you use a div element, it forces other elements to go beneath it, taking up the entire space which is referred to as Block level container. while a span does not forces element to go beneath it and does not take up entire space, it only takes up as much space as needed and is referred to as Inline level Containers. You will likely use a span when you want to span a particular group without breaking the styling into new lines.
Rico Suhanta
831 Pointsdo you mean its a container to grouping purposes?
Tierra Butler
634 Pointsok makes sense thank you
Ezra Syska
1,206 PointsThank you was still confused since I learned <div>