Learn Basic CSS by Building a Cafe Menu - Step 40 - Why in the same line?

Why does making them in the same line cause real difference in rendering? Isn’t whitespace being ignored when rendering?

Well I think I got the answer:Here