Nikita Manahov Nikita Manahov - 6 months ago 5x
HTML Question

Add a background image through css

I have attempted adding a sky background to my website's stylesheet, but nothing really happened.

body {
background: "sky-08.jpg";

When I previewed the page, the background was white, like when I just started making my page.


It should be: background-image: url("sky-08.jpg");

This also assumes that the image file is in the same location as the CSS file (Or HTML file if it is inline)

If the image is located under an images folder in the root directory: background-image: url("/images/sky-08.jpg");