Given your question ...
This is bad practice.
The background for the entire body of the page should be applied to the body tag:
body { background-image:url('sunny.gif') }
This is the best practice.
Just remember that if the image you are using is smaller than the screen, it will repeat!
A commonly recommended practice is to also indicate the appropriate background color, as it will appear immediately (and then be replaced).
body { background-image:url('sunny.gif'); background-color:#b0c4de; }
Also shortcut:
body { background:
Here is the complete list for the background:
- attachment background
- background color
- background image
- background position
- background repeat
Good entries at: http://www.beginnersguidetohtml.com/references/css
source share