This code example shows how to place a background-image on the body tag using CSS.
I wrote the CSS background code in "longhand" so you can see the three components easily:
That same CSS code can be written in "shorthand" on one line like this:
background:url('myBgImage.jpg') no-repeat 50% 0; /* This example shows your background image name */
You can replace everything between the single quote marks with the path/name of your image and it will appear on your page.
Are you using a book to help guide your learning? Learning HTML and CSS is much easier if you use a structured course like a book and work the examples in the book. If you are using bits and pieces from different sites on the internet, you will probably miss a lot of important information about how the different elements act alone and interact with each other, so I recommend taking a structured course or following a book.
You will need to be able to see the suffix of filenames on your computer.
Copy the following code to a file with an .htm or .html suffix and open it in your browser.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
background-image:url('http://placehold.it/960x800/'); /* Replace this image with your image */