To create a website with a single image as the background, we recommend using the below CSS example in your HTML code.
To implement the code above, copy the lines and paste in-between the
tags. If you use a WYSIWYG web page editor, you need to click the link or option that lets you insert HTML code before entering the code above. Finally, this example uses a picture from Computer Hope. If you want to use a custom picture, replace the bolded URL in the code with the location of your picture.Insert above code hereIf you want to set the background image to be repeated instead, set the background-repeat property to one of the following values.
If you use an external CSS style sheet, you can also copy the body portion of the example above to your CSS file.
Many users may want to create a single large image as their background. If you are planning on doing this, be considerate of people with slower Internet connections. Large images take time to load and may not look proper with people using a smaller monitor size or resolution.
- repeat - repeats the background image both horizontally and vertically.
- repeat-x - repeats the background image horizontally only.
- repeat-y - repeats the background image vertically only.
Related information
- How to create a fixed background image on a web page.
- See the CSS definition for further information and related links.
- HTML and web design help and support.