I have been trying to do something and just realized that there is a space under the span element for no reason. It is easy to remove the space so I am not asking how to remove it. I searched google but couldn't find any reason.
Can you please tell me which CSS property causes this or any other reason?
Here is also a codepen link: https://codepen.io/kavramkurdu/pen/qBWzaEQ
The following example shows the space what I exactly search for:
here is a screenshot:
* {
margin: 0;
padding: 0;
}
div {
height: 10px;
background-color: red;
}
span,
a {
background-color: green;
}
<div></div>
<span>span element (gy)</span>
<div></div>
<a href="">anchor element (gy)</a>
<div></div>