In this case body element is getting the color linen but h1 element is not getting lightblue. Can anyone please explain me this as I am new to CSS
Your semicolons are not ending the CSS statements. You need to make sure to run code through a linter for syntax errors before posting. Here's what it should look like:
body {
background-color: linen;
}
h1 {
background-color: lightblue;
}