To specify a background image in the body element of an HTML document, follow these steps.
Set a background image using the HTML body element
Add the bgproperties=“fixed” code into the body element, as shown below. Next, add the background=“location” attribute to the body tag, where location is the relative or absolute URL of the image.
This page describes how to do specify a fixed background image in the HTML body element, which is deprecated in HTML5. For a modern solution using CSS, see: How to create a web page as a single background image not tiled.
In the above example, background=“bg.gif” is setting the background picture using the bg.gif and then bgproperties=“fixed” sets the images as a fixed background that will not scroll.
Related information
- How to resize an image with HTML.
- Where can I find free public domain images and pictures?
- HTML and web design help and support.