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 trial

HTML HTML Basics Structuring Your Content Using Multiple <header> and <footer> Elements

Footer vs Header Tags

Why is the footer tag not nested and not add <p> tags vs the header tags are nested and not in the same line and add <p>?

1 Answer

rydavim
rydavim
18,813 Points

My guess it that it's just a stylistic choice by the teacher, because this particular footer only has a single line of text. Personally, I would have nested a p element inside of the footer regardless, but it is not required syntax-wise. footer and p are both block-level text elements, so it would likely display similarly either way.

Often a footer would include more information than that, so you would need nested elements. This is a fairly simple example, so you don't.