This is what listened to me the first time I learned HTML.
<style>
.test{
display:inline-block;
background-color:#aaa;
padding:5px 10px;
margin:0;
border:0;
}
</style>
<div class="test">Hello</div>
<div class="test">Woooorld</div>
<div class="test">HTML</div>
<div class="test">CSS</div>

I definitely want to keep the elements in different lines, because otherwise it will become unreadable. But HTML turns incoming into spaces, which destroys the layout. Float is causing a whole series of new problems or is simply not viable for what I'm trying to do.
Is there a better solution than implementing some hacker negative fields for everything except the first element?
source
share