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 trialSolomon Wilson
Courses Plus Student 132 Pointshow do you add the body element
How do you add the body element? And what is it used for?
<style>
h1
{
Color: Green;
}
</style>
<h1>Nick Pettit</h1>
2 Answers
Jason Nelson
9,127 Points<html>
<head>
<title>Title of the document</title>
</head>
<body>
The content of the document......
</body>
</html>
The Body is the content of your document. You will put your divs, h1, etc in the body.
Jane Marianne Filipiak
7,444 PointsInternal Styles are defined in the head section of an html page, by using a style tag. Place the style tag under the title tag. See example below. It is useful for small-scale sites and for testing new features on your site. Below is an example; <head> <title>Lake Tahoe</title> <style> p { font-size: 20px; font-weight: bold; } h1 { font-size: 90px; color: firebrick; } header { background-color: orange; } </style> </head> <body> <!--You put the main content here, i.e header, navigation bar, text and lists of images.--> </body> <footer> </footer>
Above shows an html page with an internal stylesheet, where you put all the styling rules within the head section. If you want to make complex website you need to make an external stylesheet.
Hope this is of help. Jane