The default font-size in my firefox is 16px.
The height of the body is 69px, height of div is 2*22,so the height of a tag in its content-area is 69-22-22=25.
why the line-height of a tag in its content-areais 25px?
body{
padding:0;
margin:0;
}
a {
background:black;
padding:5px 20px;
border:3px solid yellow;
margin:10px;
}
div {
background:green;
height:20px;
border:1px solid red;
}
<body>
<div></div><a href=""></a><a href=""></a><div></div>
</body>
Think for LGSon's answer,the real problem is why the height of a tag in its content-area is 25px,it is 25px too in LGSon's example.
In my case ,the height of a tag in its content-area is 25px.
The dimension is 0*25 for a tag,height is 25px.
In LGSon's first case and last case,the height of a in its content-area is 25px too. The dimension is 24*25 for the first a tag,height is 25px.