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 How to Make a Website Creating HTML Content Use the Navigation Element

Block elements inside an inline element

Nick, in your code you've wrapped two block elements (h1 and h2) in an inline element (<a>). If I remember correctly, this should be avoided as not correct.

Am I right?

3 Answers

Patrick Johnson
Patrick Johnson
9,505 Points

Already been answered else where in the forums

https://teamtreehouse.com/forum/ok-to-wrap-block-elements-inside-inline

In short though - try not to but its not horrible if you did so.

Valeria well spotted by the way :)

Thank you both! I find it confusing that you can wrap some block elements inside inline elements, but probably that's just because I am used to the XHTML syntax and rules.