Why do I get different results?

I thought that this:

body p, h1 {
  color: black;
}

was the same as this:

body p {
  color: black;
}
body h1 {
  color: black;
}

but I get different results. Does anyone know why?

No they aren’t quiet the same. Using a comma basically starts a whole new selector, so it ends up the same as doing this:

body p {
  color: black;
}

h1 { 
  color: black;
}

You can instead combine them with:

body p, body h1 {
  color: black;
}

You could simplify by giving the elements you want a class and then targeting that.