How do you set a jpg as a background in html? | Sololearn: Learn to code for FREE!

+1

How do you set a jpg as a background in html?

i have tried, background="bgimg.jpg" , but it didn't work

1/20/2017 8:11:34 AM

Jacobus van Wyk

4 Answers

New Answer

+4

When you use css to define background use background-image: url("bgimage.jpg") Do not use BACKGROUND for these purposes, because it overrides ALL background styles: color, offset, position etc

+3

use body tag body { // styles here }

0

were in css do i insert it?

0

ok that helps a lot thanks