The following example with HTML 4.01 Transitional doctype declaration, the span won't get the special gap between top and bottom.
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<body>
<div style="background:red"><span>dark green</span></div>
</body>
</html>
CSS
span {
background: yellow;
color: black;
font-size: 12px;
font-family: Arial, sans-serif;
font-weight: normal;
}
But if we change it to use the HTML5 declaration <!DOCTYPE html>
, the span will get the special gap.
Here is the whole example in jsfiddle (if you change the Fiddle Options's DTD to use HTML5, you will see the problem there.