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 trialBibek Khatiwada
353 PointsAdding head and body element
i am placing the body element within the head element still it says be sure the head is before the body. what am i missing?
<!DOCTYPE html>
<html>
<head>
<body>
</body>
</head>
</html>
2 Answers
lucybeck
6,055 PointsThink of your HTML like a person: head body (footer if necessary)
All separate parts of a whole
Bibek Khatiwada
353 PointsThanx Austin it helped
Austin Dsilva
2,516 PointsAustin Dsilva
2,516 PointsHi Bibek,
Currently your body block sits inside your head block.
The head open and close tags form the HEAD of your markup, and likewise the body open and close tags form the BODY of your html markup. Hence they cannot be placed within each other. <head></head> <body</body>
Place them as blocks (a head block, then a body block). You will soon see the block concept being applied to other elements such as a section or div which reside inside a body block.
Hope this helps .