Inline formatting-confusion

Hi all!
I am in chapter 9 right now and found a strange behaviour with inline elements. Please view examples here:

Usually inline-elements display without a gap when tags are written in one line in the codewindow.
But when you write same tags underneath each other in your code you get a gap between elements. Why? What is triggering this gap?

Except for p-tag. p-tags even cause a word wrap, unless you format them explicitly inline. Then you experience as well this gap-behaviour according to your coding again.

Could you please help me understanding this funny gap behaviour? Actually the position of tags in the code windows should not influence the result I guess.

Thank you! :slight_smile:

When you write these tags on separate lines in your code, the browser interprets the whitespace between the tags as an empty space. This results in a gap or space between the elements when they are displayed on the webpage
errors in the code so you can fix them

Hey Zaklina!
Thank u so much for your quick reply! I got it now. :smiley:

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.