How to Add a Background Image Using HTML Programming

HTML--Hypertext Markup Language--is a computer language that is used to create web pages. Web sites and web pages are written in HTML code. Whether you are setting up a personal web page or a business web page, learning HTML code can be very beneficial because it can help you manipulate your page settings. HTML documents contain plain text and have the extension .html or .htm. You can add background images to your page that can be customized to fit the content on your site. These images are a great way to give your web page more appeal and attract viewers. This guide will teach you a simple approach for adding background images to your web page.


Start the word processor or text editor that you are using to edit your web page. Locate the page file on your PC that you will be adding the image to and position the cursor inside of the



Type BACKGROUND=“?” inside of the body tag, directly in front of the name of the image that you will be using as your background image.


Replace the question mark with the location of the image on your computer. Your text should look like the following example:

This is your title

This is your welcome text.

This is your text.

This is more text for your page.


Open a new web browser to verify that your web page displays the background image correctly. The image should be repeated to fill the entire page.