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 trialAnmol Bajaj
5,556 PointsDo we still need to use <div> with <body> ? Or is it just an old practice It was recommended in the video.
In the video it was instructed to use <div> with the <body> . I just want to know the main reason, why it was asked .
5 Answers
Kyle Hartigan
16,967 PointsYou will always create elements inside your <body> tag, the body tag simply declares the beginning of the core content of the page.
riley brown
11,645 PointsYes divs are good for grouping / dividing content and styling them with css
pet
10,908 PointsYou don't have to use <div> tags, they just section up your code. You can make your own tags, for sectioning your code, but they don't do anything special.
Michael Pashkov
22,024 Pointshttps://developer.mozilla.org/en-US/docs/Web/HTML/Element/div
generic container, it's used to group content so it can be easily styled using the class or id attributes.
Deividas Paulauskas
3,661 PointsDivs will be your best friends when styling your page.