<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">Note that both the HTML and CSS pass validation tests.
<title>H1 Whitespace Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></meta>
/* If you uncomment this, it behaves as I would expect.
border: 1px solid black;
<!--If you use text instead of an h1 here, it behaves as I would expect.-->
<p>This is some other content.</p>
Here's what it looks like as is:
Here's what it looks like with a border around the div. Notice it loses the white space:
Here's what it looks like if you don't use an h1. Again, it loses the white space:
What's up with that? Is this a browser bug? Is it a spec bug? Is there something ugly that I don't know about h1s and the box model?