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

Paolo Di Pasquale
Paolo Di Pasquale
4,251 Points

Can you wrap h1 and h2 elements in anchor tags?

I didn't think it was possible to wrap inline elements such as an anchor tag around block level elements such as h1 and h2. Has this changed with the newer version of HTML?

2 Answers

Tom Bedford
Tom Bedford
15,645 Points

This changed with HTML5 - you are now allowed to wrap block elements as well.

Nick Pettit
Nick Pettit
Treehouse Teacher

BOOM! This is correct.

Paolo Di Pasquale
Paolo Di Pasquale
4,251 Points

Thanks guys, much appreciated.