The code below puts extra space between some text and again some text.
Why is the
<br>element betweensome textandagain some textnot getting 0 height. I tried bothline-height: 0andheight: 0.The second
spanelement's text in not taking 20px line-height, why?
Note: Please do not tell how to solve the problem. I only want to know why line-height works on inline elements like span this way.
.container {
  border: 1px solid black;
}
.one {
  line-height: 12px;
  font-size: 10px;
  vertical-align: top;
}
.two {
  line-height: 20px;
  vertical-align: bottom;
  font-size: 10px;
}
br {
  line-height: 0;
  height: 0;
  display: block;
}
<div class="container">
  <span class=one>
    some text <br>
    agian some text <br>    
  </span>
  
  <span class="two">
    hip hop
  </span>
  
</div>