h1 margin-bottom: 0; : Header margin « Tags « HTML / CSS






h1 margin-bottom: 0;

  

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
  <head>
    <title>Chapter 2</title>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <style>
body {
  font: 1em Verdana, Geneva, Arial, Helvetica, sans-serif;
}

h1 {
  font: 1.6em Verdana, Geneva, Arial, Helvetica, sans-serif;
  margin-bottom: 0;
}

h1+p {
  margin-top: 0;
}    
    </style>
  </head>
  <body>
    <h1>Heading</h1>
    <p>this is a test.</p>
  </body>
</html>

   
    
  








Related examples in the same category

1.h2 margin: 0;
2.h1, h2, h3 margin-left: auto; margin-right: auto;
3.H1 margin: 0 0 10px 0;
4.h1 margin-top: 0;
5.h1 margin: 0 0 30px 25px;
6.h4 margin-bottom: 3px;
7.H4 margin:0;
8.h2 margin: 0 0 0 0;