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
Amandeep Pasricha14,932 Points
Why is my h1 appearing as an in-line as opposed to a block?
I've been referring back to this video and for some reason, my project is acting weird.
In my header, I have a name element attached to an h1. However, for some reason, it shows up as an inline box when I put a border over it? I also see there's some sort of vertical margin collapse between the header and the h1 element.
Shouldn't the h1 element attached to the name tag be appearing as a block by default? This is a little weird to me. I tried to fix the margin collapse but nothing seems to be working for me.
Jacob JacksonUX Design Techdegree Student 7,833 Points
Holy smokes it really took me a minute to find the error here. I can DEFINITELY see where your confusion was.
You have beautifully formatted code and everything looks ALMOST spot on... except those pesky h1 tags.
Finally.. after trying to figure out why my h1 tags that I added were working and the ones you had added weren't, out of the corner of my eye I realized you had accidentally put "<hl>" (as in a lower-case "L").
The moment you change that you should be back up in running shape!
Your acknowledgement that your h1 SHOULD be a block level element by default was the key in figuring out the issue, so know you're already in the right headspace!
I guess maybe the lesson here is that it doesn't hurt to try rewriting a line if you're stumped, but this could've happened to anyone.
Keep up the excellent work and best of luck!