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 trialvaleriabrigatti
20,820 PointsBlock 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
9,505 PointsAlready 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.
Pav Cieslak
808 PointsValeria well spotted by the way :)
valeriabrigatti
20,820 PointsThank 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.