Why my background image only shows in specific code?

My background image shows only if I placed it under “Body”, but I would like to write it as a selected class , whenever I do that, the image doesn’t display

Your code so far
body {
margin: 0;
height: 100px;
font-family: New roman;
/background: url(‘https://images5.alphacoders.com/661/661701.jpg’);/

.background {
background-image: url(‘https://images5.alphacoders.com/661/661701.jpg’);
background-size: cover;
-webkit-background-size: cover;
filter: blur(5px);

here’s the link in codepen

the issue is not the css, it is in the html

<div= class "background">

this is NOT how you assign a class to an element

1 Like

It’s because you have = class "backgound" instead of class="background"

1 Like