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
Why include open div in "Including the header" lesson?
I have a question concerning the "Including the Header" video in the PHP course.
When it gets to the point of copying PHP previously in index.php, to the header.php file, why is the opening div tag with id='content' included?
Chase Lee29,275 Points
You can include anything you want in any file. He put an opening
content one in the header and the closing tag for that div in the footer. When you include the file in your markup it it just spits out HTML. So if you inspected the element by pressing, 'shift command U' on a mac, (I'm not sure for a pc), you can see everything as if you wrote the HTML right there and not in an PHP include file.