info343/lectures/positioning-layout-typography/scratch.html

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
   "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
   <title>scratch</title>
   <style type="text/css">
      body {
         font-size: 200%;
      }
      div.surrounding {
         background-color: lightblue;
      }
      p {
         font-size: 1em; /* = default */
         margin: 1em 0;  /* = default */
         background-color: fuchsia;
         line-height: 1em;
      }
      h2 {
         margin: 1em 0;    /* = default */
         font-size: 1.5em; /* = default */
         background-color: yellow;
         line-height: 1em;
      }
   </style>
</head>

<body>

<div style="float: left; width: 45%">
<div class="surrounding">above, no margins</div>
<p>Sphinx</p>
<div class="surrounding">below, no margins</div>
</div>

<div style="margin-left: 50%">
<div class="surrounding">above, no margins</div>
<h2 style="margin-bottom: .6667em; margin-top: .3333em">Letterpress</h2>
<div class="surrounding">below, no margins</div>
</div>

</body>
</html>