Background Picture | Sololearn: Learn to code for FREE!


Background Picture

How to put background pictures in HTML (in SoloLearn)?

7/25/2021 5:26:10 AM

Arnav Singh

2 Answers

New Answer


In css styling, set background selector in body tag with the following format: body { background: url(image.jpg) <x> <y> / <size> no-repeat <color>; } where x is x position in %/px or left, center, right y is y position in %/px, or top, center, bottom size is image size in % (% of the original image size). color is fallback color for background image that does not cover the screen fully. See more examples here:


Arnav Singh Duplicate question. Use search option.