In the following example with the Transitional doctype HTML 4.01 declaration, the span will not receive a special gap between the 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 <!DOCTYPE html> declaration, the span will receive a special space.
Here is an example in jsfiddle (if you change the DTD of the Fiddle parameters to use HTML5, you will see a problem there.
source share