There are 3 div elements on a page.
div
{
display: inline-block;
margin: 10px;
width: 200px;
height: 200px;
background-color: #333;
color: white;
text-align: center;
}
<div></div> <!--Div 1-->
<div></div> <!--Div 2-->
<div></div> <!--Div 3-->
This setup produces the following result.https://i.sstatic.net/r7vXQ.png
However, if I nest an anchor tag in any of the div elements:
<div></div> <!--Div 1-->
<div></div> <!--Div 2-->
<div> <!--Div 3 with anchor tag-->
<a href="#">Anchor Tag</a>
</div>
That specific div is pushed down. But why does this happen? https://i.sstatic.net/WcKL3.png