- 1). Open your HTML file in a plain text editor. Scroll down to the HTML section tag labeled "<styles>." This is the location where you place the background image.
- 2). Create the code to set a background image. This image must be located in the "images" folder on your web host server's hard drive. The following code sets the background image as "theImage.jpg" for the website:
body {
background: white url(/images/theImage.jpg);
} - 3). Tile the image horizontally. The following code repeats the image across the page horizontally:
body {
background: white url(/images/theImage.jpg) repeat-x;
} - 4). Repeat the image horizontally and vertically. This covers the entire background section in the user's browser. The following code tiles your image:
body {
background: white url(/images/theImage.jpg) repeat-x repeat-y;
}
SHARE