How can I put <span> and <a> element in one line using display : block, inline or inline-block?

Is the bottom picture how it looks now?

If all the text has to be on one line then you have to set the div and p elements to inline or inline-block, the span and a elements are already inline.

<div>div element</div>
<p>p element</p>
<a href="">a</a>
<span>span</span>
div {
  display: inline-block;
}

p {
  display: inline-block;
}

If it is the opposite (all elements on a separate line), then you have to set the span and a elements to be display: block