The space between the first two lines is displayed smaller in my browser than the space between the last two lines:
* {
all: unset;
display: revert;
}
p {
font-size: 28px;
line-height: 28px;
}
span {
font-size: 18px;
}
<p>
Hello, world!
</p>
<p>
Hello,
<span>world!</span>
</p>
<p>
Hello, world!
</p>
Just in case this doesn't look the same in every browser, here is a screenshot (it's only a few pixels, but visible to the naked eye):
Any ideas why this is the case? Setting the line-height
of span
to 0
seems to help. But I'd still like to understand what is going on.