My background image isn't showing up on my website


#1

I decided to use Codecademy because i use it so much and you guys all ways have amazing answers but i’m working on my website with atom the code editor and my background images isn’t showing up. please help thanks.:grinning: here is my code:

  <body background: "https://source.unsplash.com/fcDnEf0TUV0/1600x900">  

GrogNozzle

Hi I'm Lana Gillas A Front-End Developer

And by the way this is in html not CSS if you didn’t already notice.


#2

background is a CSS property, not an HTML attribute.

We could write our code like this…

<body style="background: url(https://source.unsplash.com/fcDnEf0TUV0/1600x900)">

That adds code bloat to the document, though, and CSS concerns should be separated from HTML. So,

<body>

and CSS,

body {
    background: url(https://source.unsplash.com/fcDnEf0TUV0/1600x900);
}

#3

Thanks you so much mtf i tried it and it worked thank you so much for your help


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.