If I try your code, it's not far off being there:
<!DOCTYPE html>
<html>
<head>
<style>
body {
background-color: lightblue;
}
#id1 {
color: red;
}
.class1 {
color: yellow;
background-color: black;
}
span {
background-color: blue;
color: white;
}
h3 {
color: red;
background-color: grey;
}
p.class1 {
}
.class1 {
}
#id1 {
}
#id2 {
}
</style>
</head>
<body>
<div>
<h3 id="id1">Red text header!</h3>
<p class="class1">This paragraph should have a black background and yellow text</p>
<span class="class1">Black background and white text.</span>
<span>Blue background and white text.</span>
</div>
<div>
<h3>Red text header with Grey background!</h3>
<p>Green text with white background color</p>
<p id="id2">Green text, white background color</p>
</div>
</body>
</html>
All you need to sort our are the Green Text on a White background - and since you have got this far, that should be pretty easy for you!
Hint: do you need to define a default for the paragraph?
Try it here:
Tryit Editor v3.6[
^]