Question:

HTML BACKGROUND IMAGE?

by  |  earlier

0 LIKES UnLike

I dont understand why it wont display when I run the html doc.

I have the picture saved in a folder called pictures and the pictures folder is withen the folder created for the website.

HERE is the CODE...

<html>

<head>

<title>hoc sound system</title>

</head>

<body>

<body background="pictures/home.JPEG" bgproperties="fixed">

</body>

</html>

Please, what am I doing wrong???

 Tags:

   Report

4 ANSWERS


  1. Remove the first &lt;body&gt; tag.

    rewrite the second as follow:

    &lt;body style={background-image: url (&quot;pictures/home.jpg&quot;); } &gt;

    Make sure:

    1. the image &quot;home.jpg&quot; has the correct name (it is case sentisitive and extention must be correct).

    2. the image &quot;home.jpg&quot; IS on your server, in the directory &quot;pictures&quot;!

    (If the image is still on your pc, that won&#039;t work! :-))) )


  2. hey u dont have image in background.....if u want to put image write code as following...

    html&gt;

    &lt;head&gt;

    &lt;title&gt;hoc sound system&lt;/title&gt;

    &lt;/head&gt;

    &lt;body img src=&quot;pictures/home.JPEG&quot; bgproperties=&quot;fixed&quot;&gt;

    &lt;/body&gt;

    &lt;/html&gt;


  3. Are you sure the file ending is JPEG and not JPG or jpeg or jpg. File endings can be case sensitive.

  4. hmmm... there are to &lt;BODY&gt; tags on your HTML... try checking it...
You're reading: HTML BACKGROUND IMAGE?

Question Stats

Latest activity: earlier.
This question has 4 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.