Donate SIGN UP

HTML query

Avatar Image
arianas | 12:32 Thu 10th Apr 2008 | Technology
6 Answers
i recently started learning html. i've almost learned everything except back ground image. this is how i do it
<body background="filename.gif">
is it wrong. because its not working for me. i see an image then right click and then "save picture as" and then i save the pic as it is. i write filename.gif in the "file name" box. please someone tell me what am i doing wrong. and if my saving technique is wrong then what is the right way. and where can i find website with nice gif images . thaaaaaannnnnnnkkkk you in advance.
Gravatar

Answers

1 to 6 of 6rss feed

Best Answer

No best answer has yet been selected by arianas. Once a best answer has been selected, it will be shown here.

For more on marking an answer as the "Best Answer", please visit our FAQ.
Hello,

that is the correct way, but the image has to be in the same place as the html for,

and it should be displayed,
<marquee>just felt like doing this for fun</marquee>
oh poo it didn't work!
It's technically correct, but it's the wrong way to do it.

HTML is for structure, but early on (and it seems you've been reading a tutorial that is of this era), it was used for styling too.

Really, it should work like this (imagine layers of a cake):

Presentation
---------
Scripting
---------
Structure

The structure layer is the basic layer, written in HTML. Use it only for saying what parts of the page are what. i.e., This is a heading, this is a sub-heading (H1 and H2 respectively), this is a division of the page, this is a list, this is a paragraph, etc. Right now the page is just basic fonts, black and white and plain. No alignment of text or anything.

Then use the scripting layer (JavaScript) if you want, to do other fancy things. This isn't required.

Then, you use CSS for the presentation layer. This is everything to do with moving parts of the page around, to put the site links on the side for example, as well as colour, backgrounds, etc.

Put this in your HTML at the top, in the HEAD section:

<style type="text/css">
html {background: url(filename.gif);
</style>
The issue then is the filename.gif thing.

I assume you know what folder your HTML file is in. Put the filename.gif file in the same place.

As for pictures -- well that depends what you want. Try google image search, or flickr. (Note: copyright.)
<body background="filename.gif"> is correct and will work if the filename.gif is in the same folder as your webpages, if you right clicked and saved they are possibly in another folder and would need copying to your webpage folder

1 to 6 of 6rss feed

Do you know the answer?

HTML query

Answer Question >>

Related Questions

Avatar Image
Avatar Image
boobesque
Avatar Image
mallyh
Avatar Image
djhutt
Avatar Image