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!
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 trial
PARK ROUNTREE207 Points
Can someone please explain They never explained body so i am confused
Task is wanting a body and i am confused don't remember them going over it
<body> <h1>Nick Pettit</h1> </body>
Nicholas OlsenFront End Web Development Techdegree Student 19,342 Points
The basic structure for every HTML document is like this:
<!DOCTYPE html> <html> <head> <title>The title of your document</title> </head> <body> <h1>Nick Pettit</h1> </body> </html>
The first line is <!DOCTYPE html>, this tells the browser to interpret your document as html.
The next line is html tag. This tag corresponds to the /html at the end of the document. Anything within these tags composes your HTML document.
Then there are two basic sections, the head section and the body section. The head section holds "meta" information like the title of the document, and some other things that you will learn about later.
The body section holds the visible parts of your webpage. The h1 tag is an example of a visible element: a "heading" element.
The "body" of the document (all tags and content between the opening and closing body tags) is the part of the document that is--at least potentially--seen by the user in the browser. The "head", on the other hand, contains things like links to CSS files and fonts, meta information, etc.