I'm completely new, so I'm learning the very basics, and I've encountered a problem.

I put div tags around an h1, paragraph, and image element group. when i go to css, i type div{margin:50px; background:a9a9a9;}

absolutely no effect is taken. however, when i do each element individual in the same css file, it works! so i know the file is properly linked to the html.

the html portion:

</head>
<body>
<div>
<h1>Hello World</h1>
<p><b>This</b> is a test for the <em>Learning</em> of about divs.
<a href="index.html">Click here to go back to homepage</a></p>
<h2>List</h2>
<img src="images/new-goldplatedemblems-ser-i.jpg" width="225px" height="125px" alt="gold plated emblems" />
</div>

in the css:

a {
color:red; text-decoration: none;
}

h1{
color: green;
font-family: sans-serif;
margin-left: 50px;/*pixels, percentages, and ems*/
}


/*p, h1, img{
margin-left: 50px;*/
}

div{
width: 500px;
margin:auto;
background:#a9a9a9
}

PLEASE someone tell me what I'm doing wrong.